Skip to content

Update logic and fix false-positive of dag version inflation checker#61345

Merged
vatsrahul1001 merged 3 commits intoapache:mainfrom
wjddn279:fix-dag-version-inflation-checker
Mar 30, 2026
Merged

Update logic and fix false-positive of dag version inflation checker#61345
vatsrahul1001 merged 3 commits intoapache:mainfrom
wjddn279:fix-dag-version-inflation-checker

Conversation

@wjddn279
Copy link
Copy Markdown
Contributor

@wjddn279 wjddn279 commented Feb 2, 2026

related: https://apache-airflow.slack.com/archives/C06K9Q5G2UA/p1769642556328069?thread_ts=1769631389.812549&cid=C06K9Q5G2UA

Improve: #59430

I improve the logic by checking various cases and identifying undetected or incorrectly detected scenarios from the initial version.

  • Fixed the issue where sdk.DAG(dag_id='dag_id') was not detected when used instead of DAG(dag_id='dag_id') .
  • Modified to skip checking functions defined with @task that are serialized by plain code.
  • Previously checked all functions defined within with DAG blocks, but now modified to only check functions whose names end with Operatoror Task.
  • Even if a warning occurs in a function definition, the warning is not exposed if the function is not actually called.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@wjddn279 wjddn279 force-pushed the fix-dag-version-inflation-checker branch 2 times, most recently from 2142e14 to 4809b21 Compare February 3, 2026 18:00
@wjddn279 wjddn279 force-pushed the fix-dag-version-inflation-checker branch from 4809b21 to 0e8ab92 Compare February 22, 2026 01:08
@wjddn279
Copy link
Copy Markdown
Contributor Author

wjddn279 commented Mar 4, 2026

@potiuk
Could you please review this PR?

As I understand, version 3.2.0 is going to be released soon, and I believe this bug fix and improvement should be included in that release.

@potiuk
Copy link
Copy Markdown
Member

potiuk commented Mar 4, 2026

Will do later today

@wjddn279 wjddn279 force-pushed the fix-dag-version-inflation-checker branch 5 times, most recently from 7b6eb94 to 0267de0 Compare March 10, 2026 14:16
@wjddn279 wjddn279 force-pushed the fix-dag-version-inflation-checker branch from 0267de0 to 707e88b Compare March 11, 2026 00:38
@wjddn279
Copy link
Copy Markdown
Contributor Author

remind! @potiuk

Copy link
Copy Markdown
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I guess @ephraimbuddy would have to take a look and @vatsrahul1001 might decide whether to add it or not to 3.2

@potiuk potiuk added the backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch label Mar 28, 2026
@eladkal eladkal added this to the Airflow 3.2.1 milestone Mar 29, 2026
@eladkal eladkal added the type:bug-fix Changelog: Bug Fixes label Mar 29, 2026
@vatsrahul1001
Copy link
Copy Markdown
Contributor

#59430

As #59430 already in v3-2-test we should include this

@vatsrahul1001 vatsrahul1001 merged commit 6b5c64c into apache:main Mar 30, 2026
134 checks passed
github-actions Bot pushed a commit that referenced this pull request Mar 30, 2026
…ion checker (#61345)

* change logic to detect dag version inflation

* fix logics

* fix logic for task_name
(cherry picked from commit 6b5c64c)

Co-authored-by: Jeongwoo Do <48639483+wjddn279@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Backport successfully created: v3-2-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-2-test PR Link

vatsrahul1001 pushed a commit that referenced this pull request Mar 30, 2026
…ion checker (#61345) (#64460)

* change logic to detect dag version inflation

* fix logics

* fix logic for task_name
(cherry picked from commit 6b5c64c)

Co-authored-by: Jeongwoo Do <48639483+wjddn279@users.noreply.github.com>
Suraj-kumar00 pushed a commit to Suraj-kumar00/airflow that referenced this pull request Apr 7, 2026
…pache#61345)

* change logic to detect dag version inflation

* fix logics

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

Labels

backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants