Repository navigation
Breaking change: update StackExchange.Redis to 3.2.0 - #20047
Jose Perez Rodriguez (joperezr) wants to merge 2 commits into
Conversation
Co-authored-by: Copilot App <[email protected]>
|
🚀 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" |
This comment has been minimized.
This comment has been minimized.
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. |
|
FYI 3.2.0 contains some changes that break the OTel instrumentation package you have vendored. See 1.18.0-beta.3. |
Resolve the StackExchange.Redis version conflict by retaining 3.2.0 while preserving all updates from main. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 684636d4-d7b1-4d3f-b91d-a338854bc778
PR #20047 merge-resolution validationResolution
Source validationTested the merged source directly, not an older dogfood artifact.
All 36 selected tests passed. Quarantined and outerloop tests were excluded. The builds included the Redis client, distributed caching, output caching, and Azure Redis integrations. The initial test invocation failed because the test runner duplicated a relative project path. Retrying with absolute project paths succeeded without source changes. Remaining dependency caveatRestore succeeded using the unchanged repository feed configuration, but the local package cache already contained StackExchange.Redis 3.2.0 and RESPite 3.2.0 originally downloaded from nuget.org. This is not evidence that clean CI restore is unblocked. A direct check confirmed StackExchange.Redis 3.2.0 is now available on Restore/build also reported existing NU1903 warnings for test dependency SSH.NET 2024.2.0. Local evidence
No temporary application, server, or container was created. |
Tests selectorSelects the full PR test matrix + all PR-gated jobs (ALL) — a rule matching 'Directory.Packages.props' selects ALL Selection computed for commit |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The approved feed still lacks required packages, and the migration documentation inaccurately characterizes RESP2 as restoring all v2 behavior.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
|
|
||
| StackExchange.Redis 3 uses RESP3 by default for endpoints that support it. Typed operations are generally transparent, but applications that process `RedisResult` values from `Execute`, `ExecuteAsync`, `ScriptEvaluate`, or `ScriptEvaluateAsync` may observe different result types and structures. | ||
|
|
||
| To retain the StackExchange.Redis 2 behavior while migrating result-processing code, set `protocol=resp2` in the connection string: |
|
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?