tyrellcurry commented on issue #47687:
URL: https://github.com/apache/airflow/issues/47687#issuecomment-2731657359
Notes:
This seems to be related to when the task instances are being stored in the
`task_instance` table, the `dag_version_id` is not properly assigned to them,
which is likely causing the `dag_version` data to not be pulled in with the
`task_instance` during the API call.
The one task instance with the correct version appearing has the
`dag_version_id` set in the DB, but the others that are showing `vundefined`
have the `dag_version_id` set to `[NULL]`.
I also found this here in the `airflow/jobs/scheduler_job_runner.py` file
and seeing that only TIs in State.unfinished are updated with the
`dag_version_id`
eg.
```py
# Select all TIs in State.unfinished and update the dag_version_id
for ti in dag_run.task_instances:
if ti.state in State.unfinished:
ti.dag_version = latest_dag_version
```
I am a FE dev, so this is beyond my expertise, but I would really like to
keep an eye on this to see how this is resolved.
--
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]