Skip to content

DOC-6836 Update Lettuce AMR snippets for the Lettuce 7.9 credentials API - #3623

Open
andy-stark-redis wants to merge 3 commits into
mainfrom
DOC-6836-lettuce-credentials-provider-migration-pr-3837-3838
Open

andy-stark-redis wants to merge 3 commits into
mainfrom
DOC-6836-lettuce-credentials-provider-migration-pr-3837-3838

Conversation

@andy-stark-redis

@andy-stark-redis andy-stark-redis commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

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):

  • Both credential-test snippets call resolveCredentialsAsync() and finish with .thenAccept(...).toCompletableFuture().join(). The method returns a CompletionStage, so the old .doOnNext(...).block() chain doesn't compile on it. The page now says Lettuce 7.9 or later is required.
  • The withAuthentication() connection sample now uses ClusterClientOptions and StatefulRedisClusterConnection. It creates a RedisClusterClient but used standalone types, so it didn't compile on any Lettuce version.

Compile-verified against the published lettuce-core 7.9.0.RELEASE jar on Maven Central, with redis-authx-entraid 0.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

@andy-stark-redis andy-stark-redis added do not merge yet parked PR speculatively added based on pre-release info. Check validity when release goes ahead. labels Jul 13, 2026
@github-actions

github-actions Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

DOC-6836

@github-actions

Copy link
Copy Markdown
Contributor

andy-stark-redis and others added 2 commits October 14, 2026 10:11
…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
andy-stark-redis force-pushed the DOC-6836-lettuce-credentials-provider-migration-pr-3837-3838 branch from 2d032d8 to f8e95a8 Compare October 14, 2026 09:31
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 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>
@andy-stark-redis
andy-stark-redis requested a review from a team October 14, 2026 09:58
@andy-stark-redis andy-stark-redis changed the title DOC-6836 Rename resolveCredentials() to resolveCredentialsAsync() in Lettuce AMR docs [PARKED] DOC-6836 Update Lettuce AMR snippets for the Lettuce 7.9 credentials API Oct 14, 2026
@andy-stark-redis andy-stark-redis added clients Client library docs and removed do not merge yet parked PR speculatively added based on pre-release info. Check validity when release goes ahead. labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients Client library docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants