rmfrall commented on issue #56501:
URL: https://github.com/apache/airflow/issues/56501#issuecomment-7241165838
Thanks for the detailed report and the triage so far — @borkov-andrey's
diagnosis
points at exactly the right line: `overwrite_rtif_after_execution` in
`finalize()`
tries to update an id the server has already replaced when a failed attempt
moves the
task to `up_for_retry`, and on Airflow 3.1.0 that exception escaped and
killed the task
process before the worker could finish reporting/uploading the attempt's
logs.
For anyone hitting this on a recent version, the state of the pieces on main
today:
- `task-instances/{id}/rtif` now answers a replaced id with 410 "archived"
(instead of the 404 seen in the original stack), and
`BaseTaskSupervisor._handle_set_rendered_fields` skips that response, so
the RTIF
overwrite no longer kills the worker on retry.
- `finalize()` also wraps the `SetRenderedFields` send in a try/except so an
API error
there cannot mask the original task error.
So the process-crash-and-lose-logs loop should already be fixed on recent
main — it
would help to confirm which Airflow version you are on.
While tracing this I noticed the neighbouring gap with the same blast radius:
`SetRenderedMapIndex` (the `map_index_template` label reported after
execution) had
neither protection — the endpoint answered a replaced id with a plain 404,
the
supervisor handler propagated it, and on the task-runner side the escaped
error could
mask the original task failure or fail a task that had actually succeeded.
I've
prepared a fix for that piece — client-side guards plus aligning the
rendered-map-index route with the heartbeat/RTIF routes' 410 "archived"
response — and
have opened the PR: #77729. Happy to coordinate if @darshil929 is still
working on this.
--
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]