Support redis client name#9900
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for configuring a Redis client name in Celery, which allows users to identify Redis connections in monitoring tools for easier debugging. The change introduces a new configuration parameter redis_client_name that gets passed to the Redis backend connection parameters.
Key Changes
- Added new configuration option
redis_client_namefor customizing Redis client identification - Updated Redis backend to use the client name configuration when establishing connections
- Added comprehensive test coverage for both set and unset client name scenarios
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| celery/backends/redis.py | Adds client_name parameter to Redis connection configuration |
| docs/userguide/configuration.rst | Documents the new redis_client_name configuration option |
| t/unit/backends/test_redis.py | Adds unit tests for client name functionality |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9900 +/- ##
==========================================
- Coverage 78.72% 78.67% -0.06%
==========================================
Files 153 153
Lines 19280 19291 +11
Branches 2567 2568 +1
==========================================
- Hits 15179 15177 -2
- Misses 3801 3816 +15
+ Partials 300 298 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
f5e2dff to
4a353f4
Compare
4a353f4 to
f90fc16
Compare
f90fc16 to
541e6f4
Compare
…support-redis-client-name # Conflicts: # docs/userguide/configuration.rst
auvipy
left a comment
There was a problem hiding this comment.
is the cod coverage report right? can you please cross check and improve if needed?
|
Very odd, that's definitely unexpected, I'll have a look |
|
For some reason, fixing this commit history turned out more complicated than expected. |
79317ad to
d9c4d15
Compare
|
you do not need to fix git history. if possible add some more tests and relevant docs |
Note: Before submitting this pull request, please review our contributing
guidelines.
Description
In order to simplify debugging and monitoring it would be great to be able to customise the
client_nameused by celery.This PR goes hand in hand with celery/kombu#2367, and the feature will start working only once both are merged, before no client_name will be set, but the code shouldn't break.
Notes
I added the new parameter to the docs, I didn't know what to put as
versionadded::so I ended up picking a reasonable version, but I'm aware that this is just a placeholder at this stage.