Skip to content

Fix Dataproc job not cancelled when killing a deferred task - #72591

Closed
rjgoyln wants to merge 1 commit into
apache:mainfrom
rjgoyln:fix/dataproc-trigger-reraise-cancelled
Closed

rjgoyln wants to merge 1 commit into
apache:mainfrom
rjgoyln:fix/dataproc-trigger-reraise-cancelled

Conversation

@rjgoyln

@rjgoyln rjgoyln commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The triggerer calls a trigger's on_kill() only when asyncio.CancelledError propagates out of run(). Both Dataproc submit triggers catch it and return, so on Airflow 3.3+ killing or clearing a deferred task leaves:

  • the Dataproc job still running
  • Trigger exited without sending an event. Dependent tasks will be failed. in the triggerer log

Re-raising restores the cleanup path that migrating these triggers to on_kill() was meant to keep. The pre-3.3 branch handles cancellation inline and is left alone, so the regression tests are scoped to 3.3+.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5)

Generated-by: Claude Code (Opus 5) following the guidelines

@boring-cyborg boring-cyborg Bot added area:providers provider:google Google (including GCP) related issues labels Sep 6, 2026
@rjgoyln
rjgoyln marked this pull request as ready for review September 8, 2026 07:31
@rjgoyln
rjgoyln requested a review from shahar1 as a code owner September 8, 2026 07:31
On Airflow 3.3+ the triggerer invokes a trigger's on_kill() only when the
trigger lets asyncio.CancelledError propagate out of run(). Both Dataproc
submit triggers caught it and returned instead, so killing a deferred task
left the Dataproc job running and the triggerer additionally reported the
trigger as having exited without sending an event.
@rjgoyln
rjgoyln force-pushed the fix/dataproc-trigger-reraise-cancelled branch from f48e74f to 781832b Compare September 20, 2026 04:17
@molcay

molcay commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Hi @rjgoyln,

Thank you for your change.

From my side, it seems a good change. However we want to see the system tests run results before merging a change.

Did you run the system tests? Can you share the results of the system tests?

@potiuk

potiuk commented Sep 25, 2026

Copy link
Copy Markdown
Member

Hello @rjgoyln - thank you for your contributions to Apache Airflow!

The Airflow community has introduced a limit of 5 open pull requests at a time for contributors without write access to the repository. You currently have 24 open pull requests, so - as a one-time step of introducing the limit - we closed the ones where maintainers have not engaged yet:

These pull requests stay open because maintainers are already engaged in them - they count towards your limit:

This is not a judgement of you or of your changes. We never told contributors before that opening many pull requests at once was a problem, so there is nothing to feel bad about - and nothing is lost: your branches, commits and the review history stay where they are.

What we ask you to do is to make your first prioritization decision: choose which of the pull requests above matter most to you, and reopen them (up to 5 open at a time, including the ones still open) with the "Reopen pull request" button or gh pr reopen <PR_NUMBER> --repo apache/airflow. Reopen the ones you are ready to follow through - keep them rebased, respond to review comments and fix failing checks.

While your pull requests are waiting for review, the most valuable thing you can do is help in other ways - reviewing other contributors' pull requests, helping with issues, and taking part in the discussions on the devlist and Slack.

Why we introduced the limit, what it means for you and how to reopen or restore a pull request is explained in https://github.com/apache/airflow/blob/main/contributing-docs/32_open_pull_request_limit.rst.


Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers closed because of open PR limit Closed as a one-time step of introducing the open pull request limit provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants