haseebmalik18 opened a new pull request, #67266: URL: https://github.com/apache/airflow/pull/67266
If a task is going to be SKIPPED and the IPC send of `TaskState(SKIPPED)` to the supervisor raises, the failure gets logged and swallowed. The subprocess exits 0, the supervisor sees no terminal state, and `final_state` defaults to SUCCESS. SUCCESS is in `STATES_SENT_DIRECTLY` so no `finish()` call is made either, and the TI sits at RUNNING on the server until something else cleans it up. Fix is a small pre-announcement: before sending the real `TaskState(SKIPPED)`, the subprocess sends `SetIntendedTerminalState(SKIPPED)`. Supervisor stores it on `_last_intended_state`, and `final_state` uses it as a fallback when the bigger message never lands. Same shape as the `SERVER_TERMINATED` override that already exists alongside it. Nothing changes on the worker side. No `sys.exit(1)`, `finalize()` still runs, `on_skipped_callback` and the skipped listener hook fire as usual. -- 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]
