GayathriSrividya commented on PR #67831: URL: https://github.com/apache/airflow/pull/67831#issuecomment-4966548421
> 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. Thanks for validating the guard change and the test fix. I’ll wait for formal review and follow up if anything else comes up. -- 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]
