kaxil commented on code in PR #68264:
URL: https://github.com/apache/airflow/pull/68264#discussion_r3380118923
##########
task-sdk/tests/task_sdk/definitions/test_retry_policy.py:
##########
@@ -31,8 +31,8 @@
RetryRule,
)
from airflow.sdk.execution_time.task_runner import (
- _apply_retry_policy_or_default,
_evaluate_retry_policy,
+ _handle_current_task_failed,
Review Comment:
`_finalize_task_failure` is only reached via `_handle_current_task_failed`,
and `TestHandleCurrentTaskFailed` already pins its full contract through the
asserted final state: retry-eligible → `RetryTask`
(`test_default_falls_through_to_standard_retry`,
`test_no_policy_with_should_retry_true`), not eligible → `FAILED`
(`test_no_policy_with_should_retry_false`,
`test_retry_when_retries_exhausted_still_fails`), and delay/reason forwarding +
truncation (`test_retry_with_delay_and_reason`,
`test_retry_reason_truncated_to_500_chars`). Those assert observable state
rather than the call, so they hold across a behavior-preserving refactor and
fail on a behavior-changing one. A direct test of the private helper would just
duplicate them at a more brittle level.
--
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]