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:
5bab7ede42b426b70084c98a08800346bfe22996 / 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.

Changes:
- taskinstance.py: extend prepare_db_for_next_try() guard from
  state == RUNNING to state != RESTARTING. RESTARTING already had it
  called during the clear operation; all other retryable states now get it.
- taskinstancehistory.py: use `ti.end_date or utcnow()` so a QUEUED TI
  without an end_date still gets a valid timestamp in history.
- task_instances.py (execution API): capture end_date, duration, and
  rendered_map_index before prepare_db_for_next_try() clears them.
- Tests: verify hostname/start_date preserved for QUEUED/SCHEDULED retry
  and that rendered_map_index is stored in TaskInstanceHistory.

closes: #65366
closes: #67238

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

With regards,
GitHub Actions via GitBox


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

Reply via email to