uranusjr commented on code in PR #34771:
URL: https://github.com/apache/airflow/pull/34771#discussion_r1540422244


##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -618,6 +618,11 @@ def _executable_task_instances_to_queued(self, max_tis: 
int, session: Session) -
             )
 
             for ti in executable_tis:
+                # ti.start_date could be None when the scheduler queue a TI
+                # or when the backfill CLI send a TI to the executor
+                # in this case set it at this line because 
emit_state_change_metric doesn't expect it

Review Comment:
   When can start_date not be None? A TI being queued by the scheduler is 
arguably the most canonical way to run things, so arguably 
`emit_state_change_metric` should adapt to that possibility 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]

Reply via email to