-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Refactor query status polling logic in EMRContainerHook #21423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is "CANCEL_PENDING" really a terminal state?
Looks good to me other than this question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"CANCEL_PENDING" is being treated as a failure state for the EMR container sensor, which is why I included it as a terminal state. Should it be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know the EMR behavior well enough to say. If you feel it's intentional and the right thing to do, then leave it in. Just asking because the name strikes me as an intermediate state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@victorphoenix3 Yeah, it looks like the exact same issue. If you are up for it, then by all means! But I'd say drop it in a fresh PR so you don't tie this one up. |
|
I like it. You'll have to wait for a Committer to approve and merge, but I don't see any issues. Maybe edit the top post to link to the Athena one as well. A reviewer might see that and take them both at once. |
|
Is it possible to add a unit test for that one (and rebase it ? ) I am happy to approve it but some unit testing could prevent regressions. |
23c35fb to
cdc3d6f
Compare
|
@potiuk I have added the unit tests, excuse the delay. Please review. |
cdc3d6f to
b865715
Compare
|
The failing tests were unrelated (I am fixing them in a separate branch and updated constraints to get rid of those errors). I rebased the PR to latest main to re-test it. |
b865715 to
7ee9c6d
Compare
|
Awesome work, congrats on your first merged pull request! |
Query status polling logic currently polls until the query is not in intermmediate state. It should instead poll until query is not in the terminal state.
Resolves #19877