Lee-W commented on code in PR #38180:
URL: https://github.com/apache/airflow/pull/38180#discussion_r1540371419


##########
airflow/models/taskinstance.py:
##########
@@ -2306,12 +2306,14 @@ 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,
-                )
+                # commented out because this waning is not working correctly
+                # until field like a `scheduled_dttm` are implemented
+                # see #30612 #34493 and #34771 for more details
+                # self.log.warning(
+                #     "cannot record %s for task %s because previous state 
change time has not been saved",
+                #     metric_name,
+                #     self.task_id,
+                # )

Review Comment:
   ```suggestion
                   # chaning the logging level to debug because this waning is 
not working correctly
                   # until field like a `scheduled_dttm` are implemented
                   # see #30612 #34493 and #34771 for more details
                   self.log.warning(
                       "cannot record %s for task %s because previous state 
change time has not been saved",
                       metric_name,
                       self.task_id,
                   )
   ```
   
   Looks like the consensus is to change the logging level to debug. Adding 
this suggestion for easier update



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