Repository navigation
DOC-6836 Update Lettuce AMR snippets for the Lettuce 7.9 credentials API - #3623
Open
andy-stark-redis wants to merge 3 commits into
Open
andy-stark-redis wants to merge 3 commits into
andy-stark-redis wants to merge 3 commits into
Conversation
Contributor
Contributor
…Lettuce AMR docs Lettuce PRs #3837/#3829/#3838 rename the credential-provider SPI: the RedisCredentialsProvider interface becomes CredentialsProvider and its resolveCredentials() method becomes resolveCredentialsAsync(). Updated the two call sites in the Entra ID / AMR page (one live snippet, one commented-out test line) to the new async name. Written against unmerged upstream diffs that target a "reactor-optional" feature branch, not main, so this is provisional. Parking until the rename actually ships in a released redis-authx-entraid artifact. The subtlety: our page uses redis-authx-entraid's TokenBasedRedisCredentialsProvider, not the lettuce-core class the PR diff edits, so the rename only reaches our readers once that separate artifact rebuilds against the new lettuce SPI and releases. Learned: the rename is a lettuce-core SPI change; it only affects our docs once redis-authx-entraid adopts the new lettuce and re-releases Recheck: when redis-authx-entraid releases a version whose TokenBasedRedisCredentialsProvider exposes resolveCredentialsAsync() Gaps: pinned redis-authx-entraid version left at 0.1.1-beta1 (lines 43/51) — page is intentionally inconsistent while parked; bump to the release that ships the rename on pickup Gaps: unverified whether resolveCredentials() survives as a deprecated alias (#3837 "deprecate" vs #3838 "remove") — if it does, our edit is preferred not strictly required Directive: do not merge until the rename ships in a released artifact AND the dependency version on this page is bumped to match Ticket: DOC-6836 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Unpark reconciliation for lettuce#3911, released in 7.9.0.RELEASE (2026-10-13; compare 5900bbc...7.9.0.RELEASE is ahead, behind_by 0). resolveCredentialsAsync() is a new default method on the deprecated RedisCredentialsProvider interface that returns CompletionStage, so the rename commit's .doOnNext(...).block() chain could not compile. Both amr.md snippets now use .thenAccept(...).toCompletableFuture().join(), and the test paragraph states the Lettuce 7.9 minimum. Predicted vs actual: the park snapshot (LOW, from the unmerged #3838 diff) assumed a pure rename with the Reactor chain unchanged. Both halves were wrong. #3838/#3837/#3829 all closed unmerged. #3911 shipped deprecate-with-default-method, so resolveCredentials() still compiles in 7.9 (deprecated, "scheduled for removal in Lettuce 8.0" per the 7.9.0 Javadoc) and the async form is the preferred call, not a required one. The page prose never claimed removal, so no prose change was needed. Compile-verified against lettuce-core built from the 7.9.0.RELEASE tag, with entraid 0.1.1-beta1 and 0.2.0: both snippets build with no deprecation warnings. A control file confirmed the old async chain fails with "cannot find symbol" and resolveCredentials() warns as deprecated. The jar came from a source build because 7.9.0 was not yet on Maven Central on 2026-10-14; maven-metadata.xml still listed 7.8.0 as latest. Learned: a GitHub release tag is not an installable artifact; check Maven Central before calling a Java trigger fired Constraint: keep "requires Lettuce 7.9 or later" while the snippets call resolveCredentialsAsync() Gaps: compiled against a tag source build, not the published jar; snippets not run against a live AMR database Recheck: when lettuce#3731 (8.0) ships, resolveCredentials() is removed from TokenBasedRedisCredentialsProvider Ticket: DOC-6836 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
andy-stark-redis
force-pushed
the
DOC-6836-lettuce-credentials-provider-migration-pr-3837-3838
branch
from
October 14, 2026 09:31
2d032d8 to
f8e95a8
Compare
Contributor
🧠 Redis MemoryFound 6 related items from repository history (1 new this commit):
Memory updated at ec47f03 |
The withAuthentication() sample creates a RedisClusterClient (AMR databases are clustered by default) but used standalone types, so it never compiled against any Lettuce version. RedisClusterClient.setOptions() takes ClusterClientOptions, not ClientOptions, and connect(codec) returns StatefulRedisClusterConnection, not StatefulRedisConnection. The sample and the intro sentence now use the cluster types. The enum stays ClientOptions.ReauthenticateBehavior, because that is where it is declared; ClusterClientOptions.Builder.reauthenticateBehavior() accepts it. Found by compiling the full sample during the 7.9.0 unpark. Verified with the same harness: the as-is sample fails with "no suitable method found for setOptions(ClientOptions)" and an incompatible-types error on connect, and the fixed sample builds with entraid 0.1.1-beta1 and 0.2.0. The one remaining warning is deliberate. In 7.9, passing a TokenBasedRedisCredentialsProvider to withAuthentication() binds to the overload taking RedisCredentialsProvider, which is deprecated since 7.9 in favor of withAuthentication(CredentialsProvider). In 8.0 (lettuce#3731) the class implements only CredentialsProvider, so the same source line binds to the new overload unchanged. A cast would only silence a 7.9 warning. Rejected: cast to CredentialsProvider in withAuthentication() | adds noise to silence a 7.9-only warning; the line rebinds itself in 8.0 Constraint: RedisClusterClient needs ClusterClientOptions and StatefulRedisClusterConnection; standalone types don't compile Gaps: the 8.0 overload rebinding is inferred from the 7.9.0 Javadoc and the #3731 diff, not compiled against 8.0 Ticket: DOC-6836 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kaitlynmichael
approved these changes
Oct 15, 2026
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.
Updates the Lettuce Azure Managed Redis (AMR) page,
amr.md, for the Lettuce 7.9 credentials API (redis/lettuce#3911, released in 7.9.0.RELEASE):resolveCredentialsAsync()and finish with.thenAccept(...).toCompletableFuture().join(). The method returns aCompletionStage, so the old.doOnNext(...).block()chain doesn't compile on it. The page now says Lettuce 7.9 or later is required.withAuthentication()connection sample now usesClusterClientOptionsandStatefulRedisClusterConnection. It creates aRedisClusterClientbut used standalone types, so it didn't compile on any Lettuce version.Compile-verified against the published
lettuce-core7.9.0.RELEASE jar on Maven Central, withredis-authx-entraid0.1.1-beta1 and 0.2.0. The entraid version bump is tracked separately in DOC-7006.This PR was parked from 2026-07-13 to 2026-10-14 while waiting for the upstream release. The full park and unpark history is in the squash commit message.
🤖 Generated with Claude Code