Skip to content

Remove extra slash character from file URI formation in MetastoreHivePartitionSensor.poke method. - #48731

Merged
eladkal merged 1 commit into
apache:mainfrom
VladaZakharova:fix-metastore-hive-partition-sensor
Apr 4, 2025
Merged

Remove extra slash character from file URI formation in MetastoreHivePartitionSensor.poke method.#48731
eladkal merged 1 commit into
apache:mainfrom
VladaZakharova:fix-metastore-hive-partition-sensor

Conversation

@Crowiant

@Crowiant Crowiant commented Apr 3, 2025

Copy link
Copy Markdown
Contributor

Currently MetastoreHivePartitionSensor throwing errors like:
Failure caused by Failed to download file with query result: 404 GET https://storage.googleapis.com/download/storage/v1/b/gcs-bucket-metastore-hive-partition-sensor-nitochkin-5636390b-6/o/query-results%2F3da345c3-f116-43bd-a68f-8bfa27366dc5%2F%2Fresult-001?alt=media: No such object: gcs-bucket-metastore-hive-partition-sensor-nitochkin-5636390b-6/query-results/3da345c3-f116-43bd-a68f-8bfa27366dc5//result-001: ('Request failed with status code', 404, 'Expected one of', <HTTPStatus.OK: 200>, <HTTPStatus.PARTIAL_CONTENT: 206>)
It is because of the wrong file_uri formation.
This is the fix to eliminate the problem.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@boring-cyborg boring-cyborg Bot added area:providers provider:google Google (including GCP) related issues labels Apr 3, 2025

@eladkal eladkal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add unit test for this change?
please also amend the commit message and PR title to explain what is the bug that you are fixing. Saying Fix MetastoreHivePartitionSensor is not very informative when presented in the change log.

@Crowiant
Crowiant force-pushed the fix-metastore-hive-partition-sensor branch from 47b7f75 to 073eef3 Compare April 3, 2025 13:18
@Crowiant Crowiant changed the title Fix MetastoreHivePartitionSensor Remove extra slash character from file URI formation in MetastoreHivePartitionSensor.poke method. Apr 3, 2025
@Crowiant

Crowiant commented Apr 3, 2025

Copy link
Copy Markdown
Contributor Author

Hello @eladkal ! Thank you for the comment. I've made some changes based on your feedback. Could you please take another look?

@Crowiant
Crowiant force-pushed the fix-metastore-hive-partition-sensor branch from 073eef3 to b4541ef Compare April 4, 2025 09:12
@eladkal
eladkal force-pushed the fix-metastore-hive-partition-sensor branch from b4541ef to 231aa9b Compare April 4, 2025 11:11
@eladkal
eladkal merged commit 9057c13 into apache:main Apr 4, 2025
aaron-y-chen pushed a commit to aaron-y-chen/airflow that referenced this pull request Apr 4, 2025
…reHivePartitionSensor.poke` method. (apache#48731)

Co-authored-by: Anton Nitochkin <nitochkin@google.com>
diogotrodrigues pushed a commit to diogotrodrigues/airflow that referenced this pull request Apr 6, 2025
…reHivePartitionSensor.poke` method. (apache#48731)

Co-authored-by: Anton Nitochkin <nitochkin@google.com>
simonprydden pushed a commit to simonprydden/airflow that referenced this pull request Apr 8, 2025
…reHivePartitionSensor.poke` method. (apache#48731)

Co-authored-by: Anton Nitochkin <nitochkin@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants