Skip to content

Hide "Run with latest bundle version" checkbox for non-versioned bundles when clearing #70371

Closed

Description

@WonYong-Jang

Description

Apache Airflow version

3.2.2

When clearing a past Dag Run, a "Run with latest bundle version" checkbox is shown.

Image

Its current visibility condition is whether the Dag version numbers differ(latest_dag_version.version_number != the run's latest dag_version):

The problem is that this checkbox also appears for bundles that do not support versioning, such as LocalDagBundle. In that case, toggling it has no effect on the executed result.

Because dag_run.bundle_version is always None for LocalDagBundle, the serialized Dag resolved at run time is always the latest, regardless of the checkbox.
The checkbox appears to offer an "old version vs latest version" choice, but for LocalDagBundle there is no pinned old version to choose from.

# airflow-core/src/airflow/models/dagbag.py
def _version_from_dag_run(dag_run, *, session):
    if not dag_run.bundle_version:      # always True for LocalDagBundle
        if dag_version := DagVersion.get_latest_version(dag_id=dag_run.dag_id, session=session):
            return dag_version.id        # → always falls back to the latest
    return dag_run.created_dag_version_id

Proposal: Change the visibility condition from "Dag version numbers differ" to "the run is actually pinned to a specific version"

  • Versioning-capable bundles (e.g. GitDagBundle) -> show the checkbox
  • Non-versioning bundles(e.g. LocalDagBundle) -> hide the checkbox

Use case/motivation

  • LocalDagBundle users see the checkbox and assume they can "re-run with the old code," but runs always execute the latest code. Presenting a non-existent choice erodes trust in the UI.
  • The word "bundle version" is itself meaningless for LocalDagBundle (supports_versioning = False, get_current_version() -> None), adding to the confusion.
  • Gating visibility on actual pinning makes the checkbox appear only where it has a real effect(versioning-capable bundles), making the UI honest.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. boring-cyborg commented on Jul 24, 2026

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

  2. added
    area:UIRelated to UI/UX. For Frontend Developers.
    on Jul 24, 2026
  3. added
    kind:bugThis is a clearly a bug
    and removed
    needs-triagelabel for new issues that we didn't triage yet
    on Jul 24, 2026
  4. changed the title [-]Hide the "Run with latest version" checkbox in the Clear dialog for non-versioned bundles[/-] [+]Hide "Run with latest version" checkbox for non-versioned bundles when clearing[/+] on Jul 24, 2026
  5. changed the title [-]Hide "Run with latest version" checkbox for non-versioned bundles when clearing[/-] [+]Hide "Run with latest bundle version" checkbox for non-versioned bundles when clearing[/+] on Jul 24, 2026
  6. MannXo commented on Jul 24, 2026

    @MannXo
    Contributor

    Interested in working on this. will submit a PR soon

  7. choo121600 commented on Jul 24, 2026

    @choo121600
    Member

    @WonYong-Jang Make sense! Go ahead with it :)
    @MannXo Since the original reporter expressed interest in working on this issue, let's give them the first chance to solve it. 🙂
    In the meantime, your reviews and feedback would be greatly appreciated!

  8. MannXo commented on Jul 24, 2026

    @MannXo
    Contributor

    @choo121600 fair point! my bad.
    standing down and converted my earlier submitted PR to draft.

  9. WonYong-Jang commented on Jul 25, 2026

    @WonYong-Jang
    ContributorAuthor

    @choo121600 @MannXo Thanks a lot for the opportunity!
    I'll create the PR soon and share it for your review.

  10. added a commit that references this issue on Jul 25, 2026
    153c94f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions