Repository navigation
Fix BigQueryInsertJobTrigger not propagating CancelledError - #63730
Merged
shahar1 merged 1 commit intoMay 5, 2026
Merged
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 Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
SameerMesiah97
approved these changes
Mar 22, 2026
uranusjr
reviewed
Mar 23, 2026
Contributor
Author
|
@shahar1 , could you please have a look at the pr when you have time? |
The `except asyncio.CancelledError` block in `BigQueryInsertJobTrigger.run()` caught the exception for cleanup but never re-raised it, causing the cancellation to be silently dropped. The triggerer framework never knew the trigger was cancelled. Added `raise` after cleanup to propagate the error. Updated tests to assert the exception is raised.
evgeniy-b
force-pushed
the
fix-bq-trigger-cancelled-error-not-propagated
branch
from
April 30, 2026 09:27
a38bde7 to
0fd1424
Compare
shahar1
approved these changes
May 5, 2026
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
40 of 79 tasks
1 task done
potiuk
pushed a commit
that referenced
this pull request
Oct 5, 2026
The except asyncio.CancelledError handlers in DataprocSubmitTrigger.run(), DataprocSubmitJobDirectTrigger.run() and DataprocClusterTrigger.run() performed cleanup but never re-raised, so triggerer migration (sibling steals trigger rows, original cancels its coroutines) looked like a crash: Trigger exited without sending an event, failing all dependent deferred tasks. Add the missing bare raise, mirroring the BigQuery fix in #63730, so cancellation propagates and cleanup_finished_triggers takes the transparent-migration path. Update the cancellation tests to require CancelledError instead of also accepting StopAsyncIteration.
This was referenced Oct 8, 2026
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.
The
except asyncio.CancelledErrorblock inBigQueryInsertJobTrigger.run()catches the exception to perform cleanup (cancelling the BQ job) but never re-raises it. This causes the cancellation to be silently dropped — the triggerer framework never knows the trigger was cancelled and an error gets logged:raiseafter cleanup to propagate the error.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Opus 4.6 following the guidelines