wufangyong973 opened a new pull request, #73711: URL: https://github.com/apache/airflow/pull/73711
The QUEUED -> RUNNING transition now happens in the /run execution API route instead of on the worker, so `TaskInstance.emit_state_change_metric(RUNNING)` never runs and the `queued_duration` metric goes missing. Emit it server side in `ti_run`, symmetric with the `scheduled_duration` metric the scheduler emits on the QUEUED transition. The `ti_run` route now selects `queued_dttm`, `end_date` and `queue` so the duration and tags are available, and skips re-emitting on a duplicate start request for the same host/pid. Adds two tests: - the metric is emitted on the QUEUED -> RUNNING transition with the right name, duration and tags - a duplicate start request does not emit it a second time Closes #63503 -- 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]
