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

   Found while testing retry policies on 3.4.0rc2 (#75865).
   
   The example Dag's `ConnectionError` rules never fired for the task they sit 
next to. The task calls `requests.get`, and 
`requests.exceptions.ConnectionError` subclasses `RequestException` (an 
`OSError`), not the builtin `ConnectionError`. On rc2 the task fell back to its 
5 retries at 60s with no policy decision logged. Both rules now name 
`requests.exceptions.ConnectionError`. Run against that exception, 
`API_RETRY_POLICY` returns RETRY with 30s and `STANDARD_RETRY_POLICY` returns 
RETRY with 10s. The example has done this since 3.3.0, so this is not a 3.4 
regression.
   
   Docs fixes in `tasks.rst`:
   
   - RESCHEDULE was marked `versionadded:: 3.5.0`; it ships in 3.4.0.
   - The chaining section quoted `HTTPStatusRetryPolicy: HTTP 503 (...)`, but 
the page's own policy returns `RetryDecision.retry()` with no reason for a 5xx, 
so the chain writes `HTTPStatusRetryPolicy: retry (...)`. The section now 
quotes the 404 case, which matches the `ChainRetryPolicy` docstring, and says 
what a reasonless decision shows.
   - The page said every decision is logged. The worker logs `Retry policy 
decision` only when the decision has a reason, so an unmatched 
`ExceptionRetryPolicy` or a custom policy that sets no reason leaves no line.
   - The precedence table listed only `AirflowFailException`, but 
`AirflowSensorTimeout` and `AirflowTaskTerminated` also fail the task without 
consulting the policy.
   - The `timedelta` import now sits inside the first snippet, and the 
mapped-task snippets import what they use instead of an undefined `my_policy`.
   
   The example Dag also drops `schedule=None` and `catchup=False`, which are 
the defaults.
   
   Should go to `v3-4-test` so the 3.4.0 docs carry the right version marker.
   


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