Skip to content

Commit

Permalink
Update log level to debug from warning about scheduled_duration metr…
Browse files Browse the repository at this point in the history
…ic (#38180)



---------

Co-authored-by: Tzu-ping Chung <[email protected]>
Co-authored-by: Wei Lee <[email protected]>
  • Loading branch information
3 people authored Mar 27, 2024
1 parent 4ca80cc commit b9e96df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions airflow/models/taskinstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -2391,8 +2391,10 @@ 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(
# This check does not work correctly before fields like `scheduled_dttm` are implemented.
# TODO: Change the level to WARNING once it's viable.
# see #30612 #34493 and #34771 for more details
self.log.debug(
"cannot record %s for task %s because previous state change time has not been saved",
metric_name,
self.task_id,
Expand Down

0 comments on commit b9e96df

Please sign in to comment.