kzosabe commented on code in PR #34771:
URL: https://github.com/apache/airflow/pull/34771#discussion_r1432601056
##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -614,6 +614,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
+ if ti.start_date is None:
+ ti.start_date = timezone.utcnow()
Review Comment:
After re-investigation, I think this approach is not good because
`ti.start_date` currently seems to be used as `started_running_date`, and this
change (set queued time into ti.start_date) may cause breaking changes in many
functions of this OSS.
If we want to make this logging correct, we have to create a new column in
the `TaskInstance` class such as `ti.scheduled_dttm`, but this will be a long
journey.
This is why I'm consistently want to stop the wrong warning first.
--
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]