Breaking change: update StackExchange.Redis to 3.2.0 - #20047
Breaking change: update StackExchange.Redis to 3.2.0#20047Jose Perez Rodriguez (joperezr) wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20047Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20047" |
Tests selectorSelects the full PR test matrix + all PR-gated jobs (ALL) — a rule matching 'Directory.Packages.props' selects ALL Advisory workflow impact (4)
Selection computed for commit |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Required packages remain unavailable on the approved feed, preventing CI restore and verification.
Review tier: Balanced
Findings: None
What changed in this PR
Updates the Redis client integration to StackExchange.Redis 3.2.0 while preserving RESP3 defaults and RESP2 overrides.
Changes:
- Adds AOT-compatible configuration forwarding and schema exclusions.
- Documents RESP3 migration and opt-out behavior.
- Adds protocol and configuration-binding tests.
| File | Description |
|---|---|
Directory.Packages.props |
Updates StackExchange.Redis to 3.2.0. |
AspireRedisExtensions.cs |
Adds RESP3 defaults and supported-option forwarding. |
AssemblyInfo.cs |
Excludes unsupported schema properties. |
ConfigurationSchema.json |
Adds newly supported Redis options. |
README.md |
Documents RESP3 migration guidance. |
AspireRedisProtocolTests.cs |
Tests binding and protocol selection. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Description
Updates
StackExchange.Redisfrom 2.13.1 to 3.2.0 as a separate change so the customer-visible protocol default can be reviewed, released, and rolled back independently from routine third-party dependency updates.StackExchange.Redis 3 rewrites its internal I/O implementation and defaults supported endpoints to RESP3. Aspire now explicitly preserves that default in its custom options provider, while continuing to honor
protocol=resp2andConfigurationOptions.Protocoloverrides.Redis 3.2 also exposes experimental and compile-time-obsolete
ConfigurationOptionsproperties that cannot be visited by the .NET configuration binding source generator. This change:IConnectionMultiplexerregistration andMicrosoft.Azure.StackExchangeRedisauthentication behavior unchanged;Dependency blocker
This draft is not ready to merge because the approved
dotnet-publicfeed does not yet contain:StackExchange.Redis3.2.0 (nearest available version is 3.1.31)RESPite3.2.0, a new exact transitive dependency of StackExchange.Redis 3.2.0The internal package migration queue is paused after pipeline run 3072323 failed its intermediate quarantine. No external feed or fallback source is added by this PR. The packages must be imported through the approved
dotnet-migrate-packagepipeline before this PR can restore in CI.Validation
Aspire.StackExchange.Redis, distributed caching, and output caching for .NET 8, .NET 9, and .NET 10 using the published packages from nuget.org for pre-mirror validation.Aspire.Microsoft.Azure.StackExchangeRedis.Testsacross .NET 8, .NET 9, and .NET 10.StackExchange.Redis3.2.0 is not mirrored.Fixes # (issue)
Breaking changes
Old default: StackExchange.Redis 2.13 uses RESP2 for non-Azure-Managed-Redis endpoints and RESP3 for Azure Managed Redis endpoints.
New default: StackExchange.Redis 3 uses RESP3 for every endpoint that supports it. Servers that do not support RESP3 fall back to RESP2.
Most typed
IDatabaseand cache operations are transparent. Users are affected when they or a library process rawRedisResultvalues from:Execute/ExecuteAsyncScriptEvaluate/ScriptEvaluateAsyncRESP3 can return richer types or different structures, such as maps instead of nested arrays. Applications should validate raw command and script result handling under RESP3. StackExchange.Redis 3.2 also enforces
AllowAdminfor admin commands issued throughExecute/ExecuteAsync.To temporarily preserve the previous protocol while migrating:
or:
This opt-out should be applied only where raw result handling requires it; Aspire does not blanket-disable RESP3. Redis Enterprise requires a RESP3-capable version (7.2 or later). Garnet and Valkey support RESP3, but applications using product-specific commands should validate those commands independently.
Rollback is an independent revert of this PR, restoring the StackExchange.Redis 2.13.x package and its prior protocol defaults.
Checklist
<remarks />and<code />elements on your triple slash comments?