Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a Redis result-backend transport option to treat user-specified exception classes as connection errors, allowing Celery’s retry/reconnect logic to recognize non-standard Redis/proxy/cloud errors.
Changes:
- Extend
RedisBackend.connection_errorswithadditional_connection_errorsfromresult_backend_transport_options(supports dotted import strings and class objects). - Add unit tests covering configured additional connection errors and propagation into
ResultConsumer. - Document the new
additional_connection_errorsoption in the Redis backend guide.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
celery/backends/redis.py |
Reads additional_connection_errors from transport options and appends resolved symbols to connection_errors. |
t/unit/backends/test_redis.py |
Adds tests for configuring additional connection errors (class + dotted import string) and verifying retry classification/consumer propagation. |
docs/getting-started/backends-and-brokers/redis.rst |
Documents how to configure additional_connection_errors under result_backend_transport_options. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10158 +/- ##
==========================================
- Coverage 88.26% 88.24% -0.02%
==========================================
Files 153 153
Lines 19619 19642 +23
Branches 2258 2264 +6
==========================================
+ Hits 17316 17334 +18
- Misses 2004 2007 +3
- Partials 299 301 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Co-authored-by: Copilot <[email protected]>
e97187b to
a890c01
Compare
auvipy
left a comment
There was a problem hiding this comment.
can you please fix the failing tests?
|
@ChickenBenny need your recent redis experience here |
Auto resolved |
|
LGTM — just needs a `.. versionadded:: 5.7‵ directive in the docs (redis.rst) before merge. |
Co-authored-by: Copilot <[email protected]>
Allow users to configure additional exception classes as connection errors for the Redis backend via
result_backend_transport_options. This letsexception_safe_to_retry()recognize custom errors from Redis proxies or cloud providers. Supports both class objects and dotted import strings.Fixes #10119