-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Add logic to handle on_kill for BigQueryInsertJobOperator when deferrable=True #38912
Add logic to handle on_kill for BigQueryInsertJobOperator when deferrable=True #38912
Conversation
3fe5af1
to
a5cd68d
Compare
a5cd68d
to
4078368
Compare
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.
Overall, it looks great! Left a few nitpicks
289520c
to
1b234c4
Compare
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.
LGTM. Left one nitpick
6503101
to
a3dbbf2
Compare
This PR looks good to me. I'm planning on merging it later today. But please let me know if anyone wants to take a deeper look 🙂 |
Co-authored-by: Wei Lee <weilee.rx@gmail.com>
a3dbbf2
to
a2311c7
Compare
@sunank200 As I understand this will kill the job when triggerer is restarted for deployment, maintenance etc or marked unhealthy in HA mode with the trigger to be handled by another triggerer job as the task is cancelled by asyncio and the |
@Lee-W @sunank200 @tirkarthi this PR is NOT safe, and needs to be reverted or updated. Please see my #36090 (comment) for more information. |
This pull request aims to improve the cancellation logic of the
BigQueryInsertJobOperator
when set todeferrable=True
. Previously,cancel_on_kill=True
worked well in non-deferrable mode but did not function as expected indeferrable=True
mode. This bug has been resolved with this change. However, the bug has a larger scope and is a generic issue in the trigger. An issue has already been raised on Airflow regarding this matter and can be found at #36090.^ 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 newsfragments.