Repository navigation
Add try clause to DataFusionHook.wait_for_pipeline_state - #10031
Merged
turbaszek merged 1 commit intoAug 3, 2020
Merged
Conversation
Sometimes it may happen that the pipeline is not visible instatntly in DataFusion so retriving it will result in 404 closes: apache#10030
Member
Author
|
Happy to see this as part of #10014 |
potiuk
approved these changes
Aug 3, 2020
1 of 2 tasks
shahar1
pushed a commit
that referenced
this pull request
Sep 13, 2026
#72406) #60688 changed `_check_response_status_and_data` to raise `requests.exceptions.HTTPError` on a 404 instead of `AirflowNotFoundException`, but the polling loop in `DataFusionHook.wait_for_pipeline_state` was changed to catch `KeyError` instead of `AirflowException`. The two no longer line up, so the 404 that CDAP returns while a run is still being registered escapes the loop and fails `CloudDataFusionStartPipelineOperator` immediately. That 404 tolerance was added in #10031 for exactly this reason: right after a pipeline is started, the run is not yet visible in the system. Catch `HTTPError` alongside `KeyError` so the loop keeps polling. Only the 404 branch of `_check_response_status_and_data` raises `HTTPError` (any other non-200 raises `RequestException`), so this stays narrow: real failures still propagate.
xvega
pushed a commit
to xvega/airflow
that referenced
this pull request
Sep 13, 2026
apache#72406) apache#60688 changed `_check_response_status_and_data` to raise `requests.exceptions.HTTPError` on a 404 instead of `AirflowNotFoundException`, but the polling loop in `DataFusionHook.wait_for_pipeline_state` was changed to catch `KeyError` instead of `AirflowException`. The two no longer line up, so the 404 that CDAP returns while a run is still being registered escapes the loop and fails `CloudDataFusionStartPipelineOperator` immediately. That 404 tolerance was added in apache#10031 for exactly this reason: right after a pipeline is started, the run is not yet visible in the system. Catch `HTTPError` alongside `KeyError` so the loop keeps polling. Only the 404 branch of `_check_response_status_and_data` raises `HTTPError` (any other non-200 raises `RequestException`), so this stays narrow: real failures still propagate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sometimes it may happen that the pipeline is not visible instantly in
DataFusion so retrieving it will result in 404
closes: #10030
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.