WonYong-Jang opened a new issue, #70371: URL: https://github.com/apache/airflow/issues/70371
### Description Apache Airflow version 3.2.2 When clearing a past Dag Run, a "Run with latest bundle version" checkbox is shown. <img width="1756" height="782" alt="Image" src="https://github.com/user-attachments/assets/acb51037-c1bf-4e04-9643-8e64c9708774" /> 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? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
