Repository navigation
Fix deadline callback data persistence - #69073
Conversation
|
@ferruzzi I split this out from #68961 based on your suggestion. This PR is intentionally scoped to the independent The larger PR can then be reworked separately around an opt-in failure behavior flag for users who want Deadline Alerts to fire when a DagRun fails. |
ferruzzi
left a comment
There was a problem hiding this comment.
Thanks for splitting it; this looks like a legit bug, no point trapping it while we discuss the other part.
|
@o-nikolas If you get time, would you be able to review this PR? |
Backport successfully created: v3-3-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
* Fix deadline callback data persistence * Clarify deadline callback data updates (cherry picked from commit 57cff7c) Co-authored-by: Shivam Rastogi <6463385+shivaam@users.noreply.github.com>
* Fix deadline callback data persistence * Clarify deadline callback data updates (cherry picked from commit 57cff7c) Co-authored-by: Shivam Rastogi <6463385+shivaam@users.noreply.github.com>
…ache#69259) * Fix deadline callback data persistence * Clarify deadline callback data updates (cherry picked from commit 57cff7c) Co-authored-by: Shivam Rastogi <6463385+shivaam@users.noreply.github.com>
Split out from #68961.
Deadline.handle_miss()adds deadline context and executor routing fields tocallback.data, then persists the callback row. The current code mutates nested JSON in place, so SQLAlchemy may not mark theExtendedJSONpayload dirty. That leaves reloaded callback rows without the data the scheduler expects, such asdag_run_idfor executor callbacks.This updates
handle_miss()to reassign the callback data payload when adding context/routing fields. It also stores the deadline id in callback context as a string so triggerer callback kwargs stay serialization-safe.Tests added:
Validation:
main, the sync/executor deadline callback row was marked queued but the persistedcallback.datalacked the routing/context fields. With this patch, the sync callback row persisteddag_run_id,deadline_id, and context, and the callback marker was written.