o-nikolas commented on code in PR #67217:
URL: https://github.com/apache/airflow/pull/67217#discussion_r3360034560


##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -650,6 +650,7 @@ def _executable_task_instances_to_queued(self, max_tis: 
int, session: Session) -
                     ranked_query.c.map_index_for_ordering,
                 )
                 .options(selectinload(TI.dag_model))
+                .options(selectinload(TI.dag_version))

Review Comment:
   Agreed on both points. I'll add an inline comment explaining why this 
selectinload is required (transient objects lose lazy-load capability, silently 
returning None). I'll also add a test for the ExecuteTask.make(ti) path that 
asserts version_data makes it through.
   
   Ack on the extra round-trip inside FOR UPDATE SKIP LOCKED, it's a single 
batched SELECT (not per-TI), so impact should be minimal and agreed it's fine 
for now.



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