Repository navigation
Ignore stale executor success when a deferred task has resumed to running - #71579
raghavan-arvind wants to merge 1 commit into
Conversation
46561a8 to
f437c6c
Compare
f437c6c to
50c1d5e
Compare
|
cc: @ashb from #66431, another one in the chain :(. I wonder if we want to just drop the event entirely if |
|
Just for the record, I’m leaving my question here as well. Can we guarantee that the combination of If that is the case, we could simply ignore the wrong execution. Wouldn't it be more robust to consider an alternative that uses an ID associated with the execution? I provided more details on this in #72767 |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
What
Follow-up to #66431 and #68741: extends the resume-after-defer guard in
_process_executor_eventsto the running state, for triggers that fire immediately after deferral because scheduler has processed success event from executor.Why
Ran into the following issue today, timeline from audit log:
Executor LocalExecutor(parallelism=200) reported that the task instance <TaskInstance: DAG.TASK__2026-08-13T15:00:00+00:00 [running] ti_id=019ffd71-91ba-7380-865a-671e464f41ee> finished with state success, but the task instance's state attribute is running. Learn more: https://airflow.apache.org/docs/apache-airflow/stable/troubleshooting.html#task-state-changed-externallyInline with the previous few changes to handle the race for tasks already in the
scheduledandqueuedstates. If the task isrunning, we want to handle the same way, allow thetriggererto finish the task instead of killing it.Test
Expand the previous tests to ensure tasks in the
runningstate are handled correctly. All three tests are testing the same thing -- collapse them and parameterize over the resumed state. Relying on unit tests + intuition based on the observed audit logs above.AI Disclosure
Used AI to help write the PR. Description written by hand.
Closes #71580.