uranusjr commented on code in PR #68336:
URL: https://github.com/apache/airflow/pull/68336#discussion_r3411818172
##########
airflow-core/src/airflow/models/serialized_dag.py:
##########
@@ -687,9 +687,21 @@ def write_dag(
and dag_version
and dag_version.bundle_name == bundle_name
):
- if name_updated:
- # The serialized DAG itself is unchanged, but deadline alert
name(s) were
- # updated in the DB, so report True so callers know a write
did occur.
+ # Serialized content is unchanged, so we don't create a new
DagVersion.
+ # But if the bundle advanced, refresh the latest version's pointer
in place — tasks resolve
+ # their code from ``ti.dag_version.bundle_version`` at run time,
so a stale
+ # pointer makes runs execute an outdated commit.
+ bundle_metadata_changed = (
+ dag_version.bundle_version != bundle_version or
dag_version.version_data != version_data
Review Comment:
I wonder if this may be a bit memory-expensive if `version_date` is large.
Should we have a hash to check instead?
--
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]