goingforstudying-ctrl opened a new pull request, #68741: URL: https://github.com/apache/airflow/pull/68741
Fixes a race where the trigger resumes a deferred task to `queued` (rather than `scheduled`) before the scheduler processes the executor SUCCESS from the worker defer exit. The scheduler then treated `queued` vs executor `success` as a state mismatch and failed the TI (#67287). The fix for #66374 (#66431) added handling for the `scheduled` variant. Under load the trigger may reschedule into either `queued` or `scheduled` depending on scheduler loop timing, so both states must be treated as stale defer-exit events when `next_method` is set. Changes: - Extend `ti_requeued` condition in `process_executor_events` to include `TaskInstanceState.QUEUED` - Add `test_process_executor_events_stale_success_when_queued_after_defer` (positive + negative without `next_method`) - Add newsfragment `67287.bugfix.rst` Testing: ```bash pytest airflow-core/tests/unit/jobs/test_scheduler_job.py::TestSchedulerJob::test_process_executor_events_stale_success_when_queued_after_defer -q ``` * closes: #67287 -- 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]
