Repository navigation
[v3-3-test] Fix one bad callback request crashing the Dag processor and dropping the rest (#70990) - #71608
Merged
Conversation
1 task done
…nd dropping the rest (#70990) * Fix one bad callback request crashing the Dag processor and dropping the rest A callback request that hits the documented race condition (the Dag or task was removed between scheduling the callback and parsing the file) raises out of _execute_callbacks, killing the parse subprocess. The remaining requests in the batch were already popped from the manager's queue, so on_failure_callback, on_retry_callback, and failure-email requests behind the bad one are lost permanently. Isolate each request so a failure is logged and the rest still execute, and route the last_ti task lookup through _get_dag_with_task so a removed task surfaces as the race-condition error instead of a raw TaskNotFound. * Serialize callback request once per loop iteration Avoids a second to_json() in the exception handler, where a serialization failure would mask the original error and abort the batch the handler exists to protect. * Address review: keep run conf out of logs and deliver Dag callbacks when only the task is gone The last_ti task lookup only enriches the callback context, so a task removed since the run should downgrade to the minimal context (as produce_dag_callback already does for an unrepresentable last_ti) instead of costing the user the callback. The failure log leaked user-supplied dag_run.conf at ERROR via the serialized request and carried no structured identifiers; it now excludes context_from_server and binds dag_id/run_id/ti_id so log filters can match the line. * fixup! Address review: keep run conf out of logs and deliver Dag callbacks when only the task is gone (cherry picked from commit 13b2969) Co-authored-by: Ephraim Anierobi <[email protected]>
potiuk
force-pushed
the
backport-13b2969-v3-3-test
branch
from
August 17, 2026 12:30
41a62a5 to
58dceae
Compare
potiuk
marked this pull request as ready for review
August 17, 2026 12:30
potiuk
approved these changes
Aug 17, 2026
potiuk
left a comment
Member
There was a problem hiding this comment.
Rebased onto the current v3-3-test tip; the backport replays cleanly and the tests and prek hooks it touches pass locally against this branch.
Scope-checked for a maintenance branch: this is a bugfix / documentation / dev-tooling change, with no new user-facing behaviour.
Drafted-by: Claude Code (Opus 5) (no human review before posting)
Contributor
Author
|
Hi maintainer, this PR was merged without a milestone set.
|
vatsrahul1001
pushed a commit
that referenced
this pull request
Sep 7, 2026
…nd dropping the rest (#70990) (#71608) * Fix one bad callback request crashing the Dag processor and dropping the rest A callback request that hits the documented race condition (the Dag or task was removed between scheduling the callback and parsing the file) raises out of _execute_callbacks, killing the parse subprocess. The remaining requests in the batch were already popped from the manager's queue, so on_failure_callback, on_retry_callback, and failure-email requests behind the bad one are lost permanently. Isolate each request so a failure is logged and the rest still execute, and route the last_ti task lookup through _get_dag_with_task so a removed task surfaces as the race-condition error instead of a raw TaskNotFound. * Serialize callback request once per loop iteration Avoids a second to_json() in the exception handler, where a serialization failure would mask the original error and abort the batch the handler exists to protect. * Address review: keep run conf out of logs and deliver Dag callbacks when only the task is gone The last_ti task lookup only enriches the callback context, so a task removed since the run should downgrade to the minimal context (as produce_dag_callback already does for an unrepresentable last_ti) instead of costing the user the callback. The failure log leaked user-supplied dag_run.conf at ERROR via the serialized request and carried no structured identifiers; it now excludes context_from_server and binds dag_id/run_id/ti_id so log filters can match the line. * fixup! Address review: keep run conf out of logs and deliver Dag callbacks when only the task is gone (cherry picked from commit 13b2969) Co-authored-by: Ephraim Anierobi <[email protected]>
kravii
pushed a commit
to acceldata-io/airflow
that referenced
this pull request
Nov 19, 2026
…nd dropping the rest (apache#70990) (apache#71608) * Fix one bad callback request crashing the Dag processor and dropping the rest A callback request that hits the documented race condition (the Dag or task was removed between scheduling the callback and parsing the file) raises out of _execute_callbacks, killing the parse subprocess. The remaining requests in the batch were already popped from the manager's queue, so on_failure_callback, on_retry_callback, and failure-email requests behind the bad one are lost permanently. Isolate each request so a failure is logged and the rest still execute, and route the last_ti task lookup through _get_dag_with_task so a removed task surfaces as the race-condition error instead of a raw TaskNotFound. * Serialize callback request once per loop iteration Avoids a second to_json() in the exception handler, where a serialization failure would mask the original error and abort the batch the handler exists to protect. * Address review: keep run conf out of logs and deliver Dag callbacks when only the task is gone The last_ti task lookup only enriches the callback context, so a task removed since the run should downgrade to the minimal context (as produce_dag_callback already does for an unrepresentable last_ti) instead of costing the user the callback. The failure log leaked user-supplied dag_run.conf at ERROR via the serialized request and carried no structured identifiers; it now excludes context_from_server and binds dag_id/run_id/ti_id so log filters can match the line. * fixup! Address review: keep run conf out of logs and deliver Dag callbacks when only the task is gone (cherry picked from commit 13b2969) Co-authored-by: Ephraim Anierobi <[email protected]> (cherry picked from commit b9154e5)
senthh
pushed a commit
to acceldata-io/airflow
that referenced
this pull request
Nov 23, 2026
…nd dropping the rest (apache#70990) (apache#71608) * Fix one bad callback request crashing the Dag processor and dropping the rest A callback request that hits the documented race condition (the Dag or task was removed between scheduling the callback and parsing the file) raises out of _execute_callbacks, killing the parse subprocess. The remaining requests in the batch were already popped from the manager's queue, so on_failure_callback, on_retry_callback, and failure-email requests behind the bad one are lost permanently. Isolate each request so a failure is logged and the rest still execute, and route the last_ti task lookup through _get_dag_with_task so a removed task surfaces as the race-condition error instead of a raw TaskNotFound. * Serialize callback request once per loop iteration Avoids a second to_json() in the exception handler, where a serialization failure would mask the original error and abort the batch the handler exists to protect. * Address review: keep run conf out of logs and deliver Dag callbacks when only the task is gone The last_ti task lookup only enriches the callback context, so a task removed since the run should downgrade to the minimal context (as produce_dag_callback already does for an unrepresentable last_ti) instead of costing the user the callback. The failure log leaked user-supplied dag_run.conf at ERROR via the serialized request and carried no structured identifiers; it now excludes context_from_server and binds dag_id/run_id/ti_id so log filters can match the line. * fixup! Address review: keep run conf out of logs and deliver Dag callbacks when only the task is gone (cherry picked from commit 13b2969) Co-authored-by: Ephraim Anierobi <[email protected]> (cherry picked from commit b9154e5)
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.
A callback request that hits the documented race condition (the Dag or
task was removed between scheduling the callback and parsing the file)
raises out of _execute_callbacks, killing the parse subprocess. The
remaining requests in the batch were already popped from the manager's
queue, so on_failure_callback, on_retry_callback, and failure-email
requests behind the bad one are lost permanently. Isolate each request
so a failure is logged and the rest still execute, and route the
last_ti task lookup through _get_dag_with_task so a removed task
surfaces as the race-condition error instead of a raw TaskNotFound.
Avoids a second to_json() in the exception handler, where a
serialization failure would mask the original error and abort the
batch the handler exists to protect.
The last_ti task lookup only enriches the callback context, so a task
removed since the run should downgrade to the minimal context (as
produce_dag_callback already does for an unrepresentable last_ti)
instead of costing the user the callback. The failure log leaked
user-supplied dag_run.conf at ERROR via the serialized request and
carried no structured identifiers; it now excludes context_from_server
and binds dag_id/run_id/ti_id so log filters can match the line.
(cherry picked from commit 13b2969)
Co-authored-by: Ephraim Anierobi [email protected]