Skip to content

Fix DagVersion when clearing tasks with run on latest version#65835

Merged
bbovenzi merged 7 commits into
apache:mainfrom
yuseok89:fix/clear-run-on-latest-dag-version
May 1, 2026
Merged

Fix DagVersion when clearing tasks with run on latest version#65835
bbovenzi merged 7 commits into
apache:mainfrom
yuseok89:fix/clear-run-on-latest-dag-version

Conversation

@yuseok89
Copy link
Copy Markdown
Contributor

@yuseok89 yuseok89 commented Apr 25, 2026

Problem

After clearing one task with "run on latest version", clearing another task in the same DagRun showed that task was not on the latest DagVersion. In the same situation, the "run with latest version" checkbox did not appear. The checkbox was gated on bundle_version changes, so it stayed hidden when only DagVersion numbers differed.

Solution

  • UI: Show and default "run on latest" when latest_dag_version.version_number ≠ the clear target’s version
  • Set the latest dag_version_id only on cleared task instances, while still pointing the DagRun at the latest
  • When run_on_latest_version, align DagRun version/bundle pointers to latest if they still lag, so the run does not reference an older version

Before

Screen.Recording.2026-04-25.at.12.07.41.AM.mov

After

Screen.Recording.2026-04-25.at.11.57.04.PM.mov
Screen.Recording.2026-04-25.at.11.58.04.PM.mov

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

  • 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, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Apr 25, 2026
@yuseok89 yuseok89 force-pushed the fix/clear-run-on-latest-dag-version branch from 4b01db9 to 0144302 Compare April 25, 2026 16:09
@yuseok89 yuseok89 marked this pull request as ready for review April 26, 2026 13:31
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Apr 27, 2026
@bbovenzi bbovenzi added this to the Airflow 3.2.2 milestone Apr 27, 2026
@bbovenzi bbovenzi added the backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch label Apr 27, 2026
Copy link
Copy Markdown
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

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

Looking good. A few UI nits.

@yuseok89
Copy link
Copy Markdown
Contributor Author

@bbovenzi
Thanks for the thoughtful review!
All feedback has been addressed.
Really appreciated.

@bbovenzi
Copy link
Copy Markdown
Contributor

LGTM except for static check issues

Comment thread uv.lock
@yuseok89 yuseok89 force-pushed the fix/clear-run-on-latest-dag-version branch from cbe5d33 to ed47bed Compare April 30, 2026 13:40
@bbovenzi bbovenzi merged commit 8c43743 into apache:main May 1, 2026
91 of 92 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Backport failed to create: v3-2-test. View the failure log Run details

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 Commit Link

You can attempt to backport this manually by running:

cherry_picker 8c43743 v3-2-test

This should apply the commit to the v3-2-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

bbovenzi pushed a commit that referenced this pull request May 14, 2026
#66901)

* Fix DagVersion when clearing tasks with run on latest version

* UI: Merge two useEffects in ClearGroupTaskInstanceDialog

* UI: Add spacing between clear task checkboxes

* UI: Share run on latest version logic for clear dialogs

* UI: Merge two useEffects in ClearTaskInstanceDialog

* Fix CI: apply pre-commit auto-fixes

(cherry picked from commit 8c43743)

Co-authored-by: Yuseok Jo <yuseok89@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants