The GitHub Actions job "Tests (AMD)" on 
airflow.git/fix-ti-history-retry-metadata has failed.
Run started by GitHub user kalluripradeep (triggered by kalluripradeep).

Head commit for run:
6a272edb658de2be1c01008ef7f5750f9046754a / Pradeep Kalluri 
<[email protected]>
Fix KubernetesExecutor retry losing hostname

When a task fails from a non-RUNNING state (QUEUED, SCHEDULED, or DEFERRED)
— e.g. a Kubernetes pod OOMKilled before the task process starts — the
scheduler's executor-event path calls handle_failure(). Previously,
prepare_db_for_next_try() was only invoked when ti.state == RUNNING, so
TaskInstanceHistory was never recorded for non-RUNNING retries, losing the
hostname and start_date and causing 'http://:8793 No host supplied' in the
log UI.

Fix: change the guard in fetch_handle_failure_context() from
    if ti.state == RUNNING
to
    if ti.state != RESTARTING

This ensures history is recorded for every retry-eligible failure path
(RUNNING, QUEUED, SCHEDULED, DEFERRED) while still excluding RESTARTING,
where prepare_db_for_next_try() was already called during the clear operation.

Also fix taskinstancehistory.py to preserve an existing end_date instead of
always overwriting it with utcnow(), and update the execution-API retry handler
to capture end_date and rendered_map_index before calling 
prepare_db_for_next_try().

closes: #65366
closes: #67238

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

With regards,
GitHub Actions via GitBox


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

Reply via email to