kaxil commented on PR #70685:
URL: https://github.com/apache/airflow/pull/70685#issuecomment-5170681995

   A few notes on the description text rather than the code:
   
   1. "the execution API's `AWAITING_INPUT` branch previously returned HTTP 
500" -- it didn't. That route catches everything escaping the state-update 
helper and silently marks the TI FAILED with a direct UPDATE 
([task_instances.py, lines 465-476 on 
main](https://github.com/apache/airflow/blob/b316afb44dc9686f5c39aab678a9a89cb21d53d2/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py#L465-L476)),
 bypassing retries and worker-run `on_failure` callbacks. So the PR improves 
that caller more than the body claims: the task now goes through the real 
`__fail__` path instead of a hard FAILED write. The HITL half of that sentence 
is accurate.
   
   2. The caller list ("the scheduler's `AWAITING_INPUT` timeout sweep and two 
API routes") omits the triggerer: `Trigger.submit_event` also lands in 
`handle_event_submit`, and pre-fix it had the worst failure mode of the four -- 
`handle_events` only confirms an event's persist seq after `submit_event` 
returns, so an escaping decode error meant the poison event was redelivered 
indefinitely ([triggerer_job_runner.py, lines 
764-776](https://github.com/apache/airflow/blob/b316afb44dc9686f5c39aab678a9a89cb21d53d2/airflow-core/src/airflow/jobs/triggerer_job_runner.py#L764-L776)).
   
   3. One tradeoff worth a sentence in the behaviour-change section: when 
decode fails for environment reasons rather than bad data (say an 
`allowed_deserialization_classes` mismatch or a provider missing on the 
scheduler mid rolling-upgrade), waiting tasks now fail and consume retries, 
where main halted and preserved them until the environment was fixed. Failing 
is the right call, but the body currently reads as if nothing 
previously-working is newly affected, and this is the one case where the old 
crash-loop was accidentally protective.
   


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