The GitHub Actions job "Tests (AMD)" on 
airflow.git/fix/task-queued-duration-metric-66067 has failed.
Run started by GitHub user guhyunwoo (triggered by guhyunwoo).

Head commit for run:
d3a62eac3e7b3f2d33b9a18e72d84a31106dd6a2 / Hyunwoo Gu 
<[email protected]>
Emit task.queued_duration metric on QUEUED -> RUNNING in Task SDK path

In Airflow 2 the worker emitted task.queued_duration from
TaskInstance._check_and_change_state_before_execution on the
QUEUED -> RUNNING transition. In Airflow 3 the worker reaches RUNNING
through the Execution API endpoint
PATCH /execution/task-instances/{id}/run, which never called
TaskInstance.emit_state_change_metric — so task.queued_duration stopped
being emitted on every executor while task.scheduled_duration (still
emitted by the scheduler-side path) kept working.

Emit task.queued_duration inline from the run endpoint on the first
QUEUED -> RUNNING transition, preserving the legacy
"only on first try" semantics (skip when end_date is already set from
a previous attempt) and the same tag set (task_id, dag_id, queue).

closes: #66067

Report URL: https://github.com/apache/airflow/actions/runs/26107039883

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to