You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Vamsi-klu (via GitHub)" <gi...@apache.org> on 2026/07/14 06:32:01 UTC

Re: [PR] Fix missing task instance history for non-running retries [airflow]

Vamsi-klu commented on PR #67831:
URL: https://github.com/apache/airflow/pull/67831#issuecomment-4966077883

   The guard flip from `ti.state == RUNNING` to `ti.state != RESTARTING` in `fetch_handle_failure_context` looks right. A retry-eligible failure from QUEUED or DEFERRED never reached `prepare_db_for_next_try` before, so its history row got silently dropped, and RESTARTING is correctly the one state left out since the clear already recorded it. That lines up with `is_eligible_to_retry`, where RESTARTING is the always eligible cleared-while-running path. The `ti = session.merge(ti)` change in `test_handle_failure_updates_queued_task_updates_state` is right too, since the old line discarded the instance the session actually tracks. I checked that RESTARTING and RUNNING both behave the same under either guard, so this only closes the non-running gap.
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org