uranusjr commented on code in PR #34589:
URL: https://github.com/apache/airflow/pull/34589#discussion_r1338345342
##########
airflow/models/taskinstance.py:
##########
@@ -2165,12 +2165,8 @@ def emit_state_change_metric(self, new_state:
TaskInstanceState) -> None:
elif new_state == TaskInstanceState.QUEUED:
metric_name = "scheduled_duration"
if self.start_date is None:
- # same comment as above
- self.log.warning(
- "cannot record %s for task %s because previous state
change time has not been saved",
- metric_name,
- self.task_id,
- )
+ # this could happen when the scheduler queue a TI
+ # or when the backfill CLI send a TI to the executor
Review Comment:
Would it be a good idea for those cases to set the start date 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]