Skip to content

feat: add redis connect callback, upgrade dot10 from preview#755

Merged
MayueCif merged 9 commits intomainfrom
feat/redis
Jan 5, 2026
Merged

feat: add redis connect callback, upgrade dot10 from preview#755
MayueCif merged 9 commits intomainfrom
feat/redis

Conversation

@Qinyouzeng
Copy link
Contributor

No description provided.

@Qinyouzeng Qinyouzeng requested review from MayueCif and wzh425 January 4, 2026 09:07
@Qinyouzeng Qinyouzeng changed the title feat: add connect callback feat: add redis connect callback Jan 4, 2026
@MayueCif MayueCif requested a review from Copilot January 5, 2026 00:46
Copy link

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 pull request adds a Redis connection callback feature while also updating several package versions and making StackExchange.Redis API compatibility changes.

Key Changes

  • Added connectConfig callback parameter to Redis cache initialization methods, allowing custom configuration of the Redis connection after it's established
  • Updated various package versions including Aliyun SDKs, EFCore providers, and DistributedLock packages to use centralized version variables
  • Updated StackExchange.Redis API usage to explicitly wrap channel strings in RedisChannel objects with PatternMode.Auto

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
Directory.Build.props Updated MicrosoftPackageVersion for .NET 10.0 and replaced IdentityModelPackageVersion with NewtonsoftJsonVersion
Masa.Contrib.Storage.ObjectStorage.Aliyun.csproj Updated Aliyun SDK package versions
Masa.Contrib.RulesEngine.MicrosoftRulesEngine.csproj Replaced hardcoded Newtonsoft.Json version with centralized version variable
Masa.Contrib.Data.EFCore.SqlServer.csproj Added Azure.Identity and Microsoft.Identity.Client packages conditionally for .NET 7.0
Masa.Contrib.Data.EFCore.Pomelo.MySql.csproj Updated Pomelo.EntityFrameworkCore.MySql version patterns for .NET 9.0 and .NET 10.0
Masa.Contrib.Data.EFCore.Oracle.csproj Removed conditional version selection for .NET 10.0, now uses MicrosoftPackageVersion for all targets
Masa.Contrib.Data.EFCore.Cosmos.csproj Added conditional Newtonsoft.Json dependency for .NET 6.0-8.0
Masa.Contrib.Data.DistributedLock.Medallion.*.csproj (8 files) Updated DistributedLock package versions to use centralized MedallionDistributedLockPackageVersion variable
MasaConfigurationExtensions.cs Added connectConfig parameter to UseDcc extension methods
RedisCacheClientBase.cs Added connectConfig callback invocation during Redis connection initialization; changed connection field type to ConnectionMultiplexer
RedisCacheClient.cs Added connectConfig parameter; updated null checks to use EqualityComparer; wrapped channel strings in RedisChannel objects; added null safety improvements
RedisConfigurationOptions.cs Updated ChannelPrefix assignment to wrap in RedisChannel object
RedisValueExtensions.cs Added null-forgiving operator for byte array cast
DistributedCacheBuilderExtensions.cs Added connectConfig parameter to all UseStackExchangeRedisCache overloads
ComponentConfigUtils.cs Added null-forgiving operator for rootSectionName

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

<MicrosoftPackageVersion Condition="'$(TargetFramework)' == 'net8.0'">8.*</MicrosoftPackageVersion>
<MicrosoftPackageVersion Condition="'$(TargetFramework)' == 'net9.0'">9.*</MicrosoftPackageVersion>
<MicrosoftPackageVersion Condition="'$(TargetFramework)' == 'net10.0'">10.0.0-preview.*</MicrosoftPackageVersion>
<MicrosoftPackageVersion Condition="'$(TargetFramework)' == 'net10.0'">10.*</MicrosoftPackageVersion>
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

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

The PR title indicates "feat: add redis connect callback", but this PR also includes numerous package version updates (Aliyun SDK, EFCore providers, DistributedLock packages, etc.) and StackExchange.Redis API compatibility changes (RedisChannel wrapper). These changes appear unrelated to the redis connection callback feature. Consider either updating the PR title to reflect all changes, or splitting these changes into separate PRs for better maintainability and easier review.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ignore

<DaprPackageVersion>1.10.0</DaprPackageVersion>
<GoogleProtobufPackageVersion>3.19.1</GoogleProtobufPackageVersion>
<MedallionDistributedLockPackageVersion>1.0.4</MedallionDistributedLockPackageVersion>
<MedallionDistributedLockPackageVersion>1.0.*</MedallionDistributedLockPackageVersion>
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

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

The change to MedallionDistributedLockPackageVersion from a fixed version (1.0.4) to a floating range (1.0.*) introduces supply chain risk because future builds will automatically consume any new 1.0.x release without explicit review. If an attacker compromises the package publisher or distribution channel, a malicious 1.0.x version could be pulled into your builds and run with access to your application's secrets and data. Prefer pinning this dependency to a specific, vetted version and updating it deliberately as part of a controlled dependency management process.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ignore

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 5, 2026

@Qinyouzeng Qinyouzeng changed the title feat: add redis connect callback feat: add redis connect callback, upgrade dot10 from preview Jan 5, 2026
@MayueCif MayueCif merged commit 022bfa6 into main Jan 5, 2026
3 checks passed
@MayueCif MayueCif deleted the feat/redis branch January 5, 2026 02:00
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.

3 participants