0xamlab commented on issue #75406:
URL: https://github.com/apache/airflow/issues/75406#issuecomment-6341836264

   Reproduced on 3.3.2 (task-sdk 1.3.2): try 1 (ti_id 
01a163c4-5a93-7cea-8488-db6ea2db4fda) logs `new_state=up_for_retry`, the 
callback's store.set gets `404 {"reason":"not_found"}`, and try 2 runs under a 
new id while on_failure's write succeeds. The ordering is in the SDK: run() 
sends the RetryTask terminal-state message in its finally block 
(task-sdk/src/airflow/sdk/execution_time/task_runner.py:1807), and main() calls 
finalize() — which runs on_retry_callback (task_runner.py:2515) — only 
afterwards. By then the try-1 row is archived 
(airflow-core/src/airflow/models/taskinstance.py:1081), so the `working_set is 
not True` check in 
airflow-core/src/airflow/api_fastapi/execution_api/routes/task_state_store.py:50
 rejects the accessor's stale ti_id.
   


-- 
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]

Reply via email to