Skip to content

upgrade package version and bug fix for mi to work#27

Merged
Purva-Patki merged 1 commit intomainfrom
users/prnikumb/urpmi
Feb 27, 2026
Merged

upgrade package version and bug fix for mi to work#27
Purva-Patki merged 1 commit intomainfrom
users/prnikumb/urpmi

Conversation

@prnikumb123
Copy link
Copy Markdown
Collaborator

No description provided.

@Saketa-Yasasvi Saketa-Yasasvi self-assigned this Feb 26, 2026
@Saketa-Yasasvi Saketa-Yasasvi self-requested a review February 26, 2026 13:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades Unified Redis Platform package versions and updates Managed Identity (MI) connectivity behavior to improve stability.

Changes:

  • Bumped Microsoft.UnifiedRedisPlatform.Core to 1.6.0 across SDK and test apps.
  • Updated MI Redis authentication to use ConfigureForAzureWithTokenCredentialAsync and adjusted defaults (timeouts/keep-alive).
  • Added/updated .NET Framework test app dependencies and binding redirects to support the new packages.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/tests/Microsoft.UnifiedRedisPlatform.TestApps/TestWebAppCore.SDK/Microsoft.UnifiedRedisPlatform.TestWebAppCore.SDK.csproj Adds Core package reference for test web app.
src/tests/Microsoft.UnifiedRedisPlatform.TestApps/TestConsoleCore.SDK/Microsoft.UnifiedRedisPlatform.TestConsoleCore.SDK.csproj Upgrades Core package reference to 1.6.0.
src/tests/Microsoft.UnifiedRedisPlatform.TestApps/TestConsole461.SDK/packages.config Upgrades Core and adds/updates framework dependencies for net472 test app.
src/tests/Microsoft.UnifiedRedisPlatform.TestApps/TestConsole461.SDK/Microsoft.UnifiedRedisPlatform.TestConsole461.SDK.csproj Updates assembly references to align with upgraded packages.
src/tests/Microsoft.UnifiedRedisPlatform.TestApps/TestConsole461.SDK/App.config Adds binding redirects for upgraded/transitive assemblies.
src/sdk/Extensions/Microsoft.Extensions.Caching.UnifiedRedisPlatform/Microsoft.Extensions.Caching.UnifiedRedisPlatform.csproj Bumps extension package version and updates Core dependency + release notes.
src/sdk/Core/Services/HttpClientFactory.cs Sets an explicit HttpClient timeout for URP calls.
src/sdk/Core/RedisConnectionBuilder.cs Updates MI auth flow + keep-alive defaults and formatting tweaks.
src/sdk/Core/Microsoft.UnifiedRedisPlatform.Core.nuspec Bumps nuspec version to 1.6.0 and updates release notes.
src/sdk/Core/Microsoft.UnifiedRedisPlatform.Core.csproj Bumps Core version and updates release notes.
src/sdk/Core/Configurations/RetryProtocol.cs Increases default operation timeout to 10s.
Comments suppressed due to low confidence (1)

src/sdk/Core/RedisConnectionBuilder.cs:163

  • The else branch contradicts the comment: instead of keeping the connection-string password for legacy behavior, it fetches a token and overwrites options.Password. If legacy mode is intended when _useManagedIdentity is false, the else branch should not acquire/set an AAD token; it should leave options.Password as parsed from the connection string (or only perform token logic under the MI path).
            options.AbortOnConnectFail = false;
            options.Ssl = true;
            options.KeepAlive = 60;  // Send keep-alive every 60 seconds to prevent stale connections

            // Use Managed Identity for Redis authentication if configured
            // ConfigureForAzureWithTokenCredentialAsync handles automatic token refresh
            // Otherwise, keep the password from the connection string (legacy behavior)
            if (_useManagedIdentity && _tokenCredential != null)
            {
                await options.ConfigureForAzureWithTokenCredentialAsync(_tokenCredential).ConfigureAwait(false);
            }
            else
            {
                var token = await GetRedisAccessTokenAsync();
                options.Password = token;
            }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.3, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.8.0.3\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.UnifiedRedisPlatform.Core, Version=1.0.4.0, Culture=neutral, processorArchitecture=MSIL">
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The assembly reference version (1.0.4.0) does not match the referenced package folder (1.6.0). This mismatch can cause build/load failures or require unexpected binding redirects. Update the Reference Include version to the actual assembly version shipped by the 1.6.0 package (or remove the explicit Version=... so MSBuild resolves it from the DLL metadata).

Suggested change
<Reference Include="Microsoft.UnifiedRedisPlatform.Core, Version=1.0.4.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Microsoft.UnifiedRedisPlatform.Core, Culture=neutral, processorArchitecture=MSIL">

Copilot uses AI. Check for mistakes.
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The System.IO.Compression reference contains duplicate <Private>True</Private> entries. Remove one of them to avoid confusion and keep the project file clean.

Suggested change
<Private>True</Private>

Copilot uses AI. Check for mistakes.
Comment on lines +13 to 20
v1.6.0:
- Fixed: Managed Identity token refresh - now uses ConfigureForAzureWithTokenCredentialAsync for automatic token renewal
- Improved: Default operation timeout increased from 3s to 10s to accommodate MI token acquisition
- Improved: Added 60-second keep-alive to prevent stale connections
- All MI authentication methods (ServerOptions, LocalOptions, Direct Connect) now work correctly
- Added Managed Identity (MI) support for Azure Redis Cache authentication
- Upgraded to Microsoft.Azure.StackExchangeRedis 3.2.1
- Added ConnectAsync() method for async connection initialization
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release notes are labeled v1.6.0 but include items that read like earlier-version features (e.g., 'Added Managed Identity support', 'Upgraded ...', 'Added ConnectAsync()'). Consider splitting these into the correct historical versions (or trimming to only the changes introduced in 1.6.0) so package consumers have accurate versioned change history.

Copilot uses AI. Check for mistakes.
@Purva-Patki Purva-Patki merged commit f0def26 into main Feb 27, 2026
7 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants