kaxil commented on code in PR #67217:
URL: https://github.com/apache/airflow/pull/67217#discussion_r3291413768


##########
airflow-core/src/airflow/executors/workloads/task.py:
##########
@@ -118,9 +118,13 @@ def make(
 
         ser_ti = TaskInstanceDTO.model_validate(ti, from_attributes=True)
         if not bundle_info:
+            version_data = None
+            if ti.dag_version is not None:
+                version_data = ti.dag_version.version_data

Review Comment:
   Worth flagging that even off the same `ti`, `version` and `version_data` can 
disagree. Two cases:
   1. Unpinned runs (`disable_bundle_versioning=True`): 
`dag_run.bundle_version` is `None`, but `ti.dag_version.version_data` may still 
carry a manifest -- so `version=None, version_data={...}`.
   2. After `_verify_integrity_if_dag_changed` 
(`scheduler_job_runner.py:2521-2530`): TI's `dag_version_id` is bumped to the 
latest version while `dag_run.bundle_version` is left untouched, so 
`version_data` describes a newer version than `version` reports.
   
   The scheduler picks a deliberate rule for `bundle_version` at 
`scheduler_job_runner.py:1438-1442`; worth deciding the equivalent rule for 
`version_data` here (e.g., is it valid to expose `version_data` when `version` 
is `None`?).



-- 
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]

Reply via email to