Skip to content

Conversation

@alaminopu
Copy link
Contributor

Description

Add support credential_provider to Redis Backend

Fixes #8505

@codecov
Copy link

codecov bot commented Aug 30, 2025

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 78.72%. Comparing base (f55bb5f) to head (dd394e2).
⚠️ Report is 73 commits behind head on main.

Files with missing lines Patch % Lines
celery/backends/redis.py 95.45% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9879      +/-   ##
==========================================
+ Coverage   78.70%   78.72%   +0.02%     
==========================================
  Files         153      153              
  Lines       19258    19280      +22     
  Branches     2561     2567       +6     
==========================================
+ Hits        15157    15179      +22     
  Misses       3803     3803              
  Partials      298      298              
Flag Coverage Δ
unittests 78.70% <95.45%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@auvipy auvipy self-requested a review August 30, 2025 12:56
@alaminopu alaminopu changed the title Add support credential_provider to Redis Backend Feature: Add support credential_provider to Redis Backend Aug 30, 2025
@alaminopu
Copy link
Contributor Author

@Nusnus @auvipy can I get a review on the PR?

@alaminopu alaminopu requested a review from auvipy September 2, 2025 07:23
@alaminopu
Copy link
Contributor Author

@auvipy, can you re-review please?

@auvipy auvipy added this to the 5.6.0 milestone Sep 10, 2025
@Nusnus Nusnus requested a review from Copilot September 10, 2025 16:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Redis credential providers to the Redis backend, allowing users to authenticate with Redis using credential provider classes instead of static username/password pairs. This addresses issue #8505 and enables more secure authentication patterns for Redis connections.

Key changes:

  • Added configuration option redis_backend_credential_provider for setting credential providers
  • Implemented URL parameter support for credential providers in Redis connection strings
  • Added comprehensive test coverage for both configuration and URL-based credential provider usage

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
celery/backends/redis.py Core implementation of credential provider support in Redis backend
t/unit/backends/test_redis.py Comprehensive test cases for credential provider functionality
docs/userguide/configuration.rst Documentation for the new redis_backend_credential_provider setting
docs/getting-started/backends-and-brokers/redis.rst User guide documentation with credential provider URL examples
requirements/test.txt Added additional test dependencies for azureblockblob and gevent

Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about renaming the new config to just redis_credential_provider?

@alaminopu
Copy link
Contributor Author

@auvipy What is your reasoning to rename to redis_credential_provider?

@alaminopu
Copy link
Contributor Author

@auvipy still waiting for getting an answer for your reasoning.

Copy link
Member

@Nusnus Nusnus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@auvipy What is your reasoning to rename to redis_credential_provider?

The PR looks good; friendly ping @auvipy if you may please check this out and approve/comment.
It makes sense to keep the backend keyword in the identifier - is there anything we’re missing?

Thank you 🙏

@auvipy auvipy merged commit 893ce60 into celery:main Sep 18, 2025
108 of 109 checks passed
@auvipy
Copy link
Member

auvipy commented Nov 11, 2025

@alaminopu can you please check this report celery/kombu#2406 ?

@alaminopu
Copy link
Contributor Author

@alaminopu can you please check this report celery/kombu#2406 ?

Yes, I will take a look this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support credential_provider Redis client option

3 participants