Skip to content

[v3-1-test] Fix dag processor callback cleanup for versioned bundle files (#66484)#69771

Open
Vamsi-klu wants to merge 1 commit into
apache:v3-1-testfrom
Vamsi-klu:backport-v3-1-callback-versioned-bundle
Open

[v3-1-test] Fix dag processor callback cleanup for versioned bundle files (#66484)#69771
Vamsi-klu wants to merge 1 commit into
apache:v3-1-testfrom
Vamsi-klu:backport-v3-1-callback-versioned-bundle

Conversation

@Vamsi-klu

Copy link
Copy Markdown
Contributor

Backport of #66484 ("Fix dag processor callback cleanup for versioned bundle files") to v3-1-test, addressing #63374 (Dag-level on_failure_callback never fires on a versioned/git bundle).

Root cause: the Dag File Processor keyed queued callback files by a DagFileInfo whose bundle_version participates in equality, while the periodic scan re-creates the same file with bundle_version=None. On a versioned (git) bundle the purge step compared them under full equality, treated the queued versioned callback file as no longer present, and dropped it before it was processed — so the callback never fired. #66484 gates the purge/terminate/stats-cleanup checks on a version-independent presence_key instead of full dataclass equality.

This is a clean cherry-pick of 692728371f; the only conflict was a one-line context clash (v3-1 uses Stats.gauge, main uses stats.gauge), resolved to keep the v3-1 spelling. The prerequisite #61232 is already present on v3-1-test; #63795 and #69185 are separate 3.2.0/3.4.0 features and are not required for this fix. No new newsfragment — the change already carries #66484's changelog entry on main.

The five test_manager.py guard tests added by #66484 pass on v3-1-test, and the key one fails without the presence_key change (verified locally).

Opened as a draft for release-manager consideration — the fix already ships in Airflow 3.3.0 (#66484's milestone); this only matters if a further 3.1.x patch is planned.

related: #63374


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

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

…#66484)

* Fix callback orphan cleanup for versioned bundle files

closes: apache#66483

* Remove newsfragment for callback orphan cleanup fix

* Fix versioned dag file presence checks

* Preserve public signatures for versioned dag file checks

* Preserve manager cleanup extension points
@Vamsi-klu Vamsi-klu marked this pull request as ready for review July 11, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants