Fix Redis Lettuce passwordless auto-config bean collision#49293
Merged
rujche merged 4 commits intoMay 28, 2026
Conversation
2 tasks
Co-authored-by: rujche <171773178+rujche@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix lack of bean name in @ConditionalOnMissingBean
Fix Redis Lettuce passwordless auto-config bean collision
May 28, 2026
rujche
approved these changes
May 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Redis Lettuce passwordless Spring auto-configuration so the Azure Lettuce customizer is not skipped when applications define their own LettuceClientConfigurationBuilderCustomizer.
Changes:
- Changes the Azure Lettuce customizer condition from type-based to bean-name-based.
- Adds regression coverage verifying user and Azure Lettuce customizers coexist.
- Adds a changelog entry for the Redis passwordless auto-configuration fix.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/data/redis/AzureLettucePasswordlessAutoConfiguration.java |
Narrows the missing-bean condition to the Azure customizer bean name. |
sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/data/redis/AzureLettucePasswordlessAutoConfigurationTest.java |
Adds a regression test for coexistence with a user-defined Lettuce customizer. |
sdk/spring/CHANGELOG.md |
Documents the Redis Lettuce passwordless auto-configuration bug fix. |
Member
|
/azp run java - spring - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
rujche
reviewed
May 28, 2026
Co-authored-by: rujche <171773178+rujche@users.noreply.github.com>
rujche
approved these changes
May 28, 2026
Member
|
/azp run java - spring - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
rujche
approved these changes
May 28, 2026
Member
|
/azp run java - spring - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Redis passwordless auto-configuration was gating the Azure
LettuceClientConfigurationBuilderCustomizerby type, so any user-defined customizer could suppress the Azure one entirely. That dropped the Azure Redis credentials provider and RESP2 configuration, breaking passwordless auth in a way that was hard to diagnose.Auto-configuration
azureLettuceClientConfigurationBuilderCustomizer.LettuceClientConfigurationBuilderCustomizerfor unrelated concerns.Regression coverage
Documentation
Example of the behavioral change:
With this change, a user bean such as:
no longer suppresses the Azure passwordless customizer.