Skip to content

[v3-3-test] Detect Dag subclasses in the Dag version inflation check (#72861) - #72898

Merged
vatsrahul1001 merged 4 commits into
v3-3-testfrom
backport-1e2ad80-v3-3-test
Sep 11, 2026
Merged

vatsrahul1001 merged 4 commits into
v3-3-testfrom
backport-1e2ad80-v3-3-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

The check only recognized a Dag constructor when the callable resolved
through a from-import of airflow's DAG or dag. A Dag built from a
subclass, or reached through an aliased module import, produced no
warnings at all — and because task detection keys off the same
predicate, neither did any task inside its with-block.

The Dag file is not imported yet when the check runs, so there is no
object to test — only names and the file's own imports. The cost of
leaning on names is an occasional false positive on something merely
named like a Dag.
(cherry picked from commit 1e2ad80)

Co-authored-by: Jed Cunningham 66968678+jedcunningham@users.noreply.github.com

…72861)

The check only recognized a Dag constructor when the callable resolved
through a from-import of airflow's DAG or dag. A Dag built from a
subclass, or reached through an aliased module import, produced no
warnings at all — and because task detection keys off the same
predicate, neither did any task inside its with-block.

The Dag file is not imported yet when the check runs, so there is no
object to test — only names and the file's own imports. The cost of
leaning on names is an occasional false positive on something merely
named like a Dag.
(cherry picked from commit 1e2ad80)

Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
@vatsrahul1001
vatsrahul1001 marked this pull request as ready for review September 10, 2026 16:48
@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.3.2 milestone Sep 10, 2026
@vatsrahul1001 vatsrahul1001 added the type:bug-fix Changelog: Bug Fixes label Sep 10, 2026
@vatsrahul1001
vatsrahul1001 merged commit ff8b776 into v3-3-test Sep 11, 2026
115 checks passed
@vatsrahul1001
vatsrahul1001 deleted the backport-1e2ad80-v3-3-test branch September 11, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants