Codingaditya17 commented on issue #67287: URL: https://github.com/apache/airflow/issues/67287#issuecomment-4510784814
Hi, I did a quick local investigation. The current `ti_requeued` logic in `SchedulerJobRunner._process_executor_events` already treats `SCHEDULED`, `QUEUED`, `RUNNING`, and `RESTARTING` as queued-like states, but the resume-after-defer stale-success exception only applies when `ti.state == TaskInstanceState.SCHEDULED`. I tested a small local change to include the queued variant: ```python ti.state in (TaskInstanceState.SCHEDULED, TaskInstanceState.QUEUED) and state == TaskInstanceState.SUCCESS and ti.next_method is not None I also updated the existing regression test for stale executor success after defer to parametrize both State.SCHEDULED and State.QUEUED. Focused test passed locally: airflow-core/tests/unit/jobs/test_scheduler_job.py::TestSchedulerJob::test_process_executor_events_stale_success_when_rescheduled_after_defer[scheduled] PASSED airflow-core/tests/unit/jobs/test_scheduler_job.py::TestSchedulerJob::test_process_executor_events_stale_success_when_rescheduled_after_defer[queued] PASSED Happy to open a PR with this change if this approach looks reasonable after triage. -- 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]
