nathadfield commented on code in PR #61448:
URL: https://github.com/apache/airflow/pull/61448#discussion_r2889679008
##########
airflow-core/docs/administration-and-deployment/dag-bundles.rst:
##########
@@ -139,6 +139,96 @@ are configured so that impersonated users can access
bundle files created by the
the need for shared group permissions.
+Configuring Default Bundle Version Behavior
+--------------------------------------------
+
+When using versioned DAG bundles (such as ``GitDagBundle``), Airflow provides
flexible control
+over which bundle version is used for DAG runs through a three-level
configuration hierarchy.
+
+.. note::
+
+ Bundle versioning is only supported by certain bundle types (like
``GitDagBundle``). Local bundles
+ (``LocalDagBundle``) do not support versioning and will always use the
latest code.
+
+Precedence Hierarchy
+~~~~~~~~~~~~~~~~~~~~
+
+The bundle version used for a DAG run is determined by the following
precedence (highest to lowest):
+
+1. **DAG Level**: The DAG's ``run_on_latest_version`` parameter
+2. **Global Level**: The ``[core] run_on_latest_version`` configuration setting
+3. **System Default**: Use the original bundle version (``False`` - for
reproducibility)
+
+Global Configuration
+~~~~~~~~~~~~~~~~~~~~
+
+You can set organization-wide defaults using the ``[core]
run_on_latest_version`` configuration option.
+This setting determines the default behavior for all DAGs unless overridden at
the DAG level.
+
+.. code-block:: ini
+
+ [core]
+ run_on_latest_version = False # Default - use original bundle version
+ # run_on_latest_version = True # Alternative - use latest bundle version
+
+- When **False** (default): DAG runs use the original bundle version that was
active when the DAG was first parsed, ensuring reproducibility and consistency
across the entire run.
+- When **True**: DAG runs use the latest available bundle version when
triggered, rerun, or cleared, ensuring DAGs always run with the most up-to-date
code.
Review Comment:
I've rewritten the docs section to clarify. See the reply to your general
comment for the full explanation.
--
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]