kaxil opened a new pull request, #68264:
URL: https://github.com/apache/airflow/pull/68264

   Pure rename in the Task SDK runner to fix a naming inversion, no behavior 
change.
   
   After #68254 routed the non-deferrable `TriggerDagRunOperator` failed-state 
branch through the retry-policy wrapper, `_handle_current_task_failed` ended up 
with zero direct external callers: every failure path (`run()`'s exception 
handlers and the TDRO wait branch) now enters through 
`_apply_retry_policy_or_default`. The two function names were inverted relative 
to the call hierarchy:
   
   - `_apply_retry_policy_or_default` sounded like a sub-step but was the 
actual entry point.
   - `_handle_current_task_failed` sounded like the umbrella but was the 
private mechanics primitive (emit metrics, check `should_retry`, build the 
`RetryTask`/`TaskState` message).
   
   ## What changed
   
   - `_apply_retry_policy_or_default` -> `_handle_current_task_failed` (the 
entry point: evaluate the policy, then fall back to the standard decision).
   - old `_handle_current_task_failed` -> `_finalize_task_failure` (the 
mechanics: record failure metrics, return the standard retry-or-fail outcome).
   - Docstrings updated to state each function's role; tests reference the 
renamed entry point.
   
   Callers now read naturally, e.g. `_handle_current_task_failed(ti, e, 
context)` and (in the TDRO branch) `_handle_current_task_failed(ti, 
AirflowException(...), context)`.
   
   Follow-up to #68254.
   


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