Skip to content

Release/v1.1.0#39

Merged
micheloliveira-com merged 24 commits into
mainfrom
develop
Feb 3, 2026
Merged

Release/v1.1.0#39
micheloliveira-com merged 24 commits into
mainfrom
develop

Conversation

@micheloliveira-com
Copy link
Copy Markdown
Owner

@micheloliveira-com micheloliveira-com commented Feb 3, 2026

Summary by CodeRabbit

  • New Features

    • Added .NET 10 runtime support across all packages
    • Introduced new initialization API for distributed gRPC reactive locks
  • Chores

    • Updated package dependencies to stable releases
    • Updated Docker base images to .NET 10 stable versions
    • Enhanced CI/CD workflows with .NET 10 build and test support
    • Optimized configuration settings for improved performance

micheloliveira-com and others added 23 commits September 26, 2025 12:28
…ency-injection-strategy

Feature/improve dependency injection strategy
…ation-tests-to-dotnet-10

Feature/upgrade integration tests to dotnet 10
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

Updates projects to support .NET 10 across workflows and target frameworks. Refactors distributed lock extensions to use consolidated state containers replacing multiple static fields. Updates Docker images to stable .NET versions and migrates to docker compose CLI. Upgrades dependencies and integration test configurations.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/k6-test-multi.yml, .github/workflows/k6-test-single.yml, .github/workflows/pack-nupkgs.yml, .github/workflows/sonarqube.yml
Added .NET 10 installation steps across workflows. Updated k6-test-single to use docker compose CLI instead of docker-compose and added always() guards for artifact upload steps. Updated k6-test-multi NuGet version and renamed login step with updated reference paths.
Project Target Framework Updates
src/ReactiveLock.Core/*.csproj, src/ReactiveLock.DependencyInjection/*.csproj, src/ReactiveLock.Distributed.Grpc/*.csproj, src/ReactiveLock.Distributed.Redis/*.csproj, src/ReactiveLock.Shared.Distributed/*.csproj, src/ReactiveLock.Tests/*.csproj
Extended TargetFrameworks to include net10.0 across six projects previously supporting only net8.0 and net9.0.
gRPC Extensions Refactoring
src/ReactiveLock.Distributed.Grpc/ReactiveLockGrpcTrackerExtensions.cs, src/ReactiveLock.Distributed.Grpc/ReactiveLockGrpcTrackerExtensionsState.cs
Consolidated static fields (IsInitializing, RegisteredLocks, StoredInstanceName, RemoteClients) into ExtensionsState container. Added new public overload of InitializeDistributedGrpcReactiveLock accepting remoteClients array parameter.
Redis Extensions Refactoring
src/ReactiveLock.Distributed.Redis/ReactiveLockRedisTrackerExtensions.cs, src/ReactiveLock.Distributed.Redis/ReactiveLockRedisTrackerExtensionsState.cs
Replaced three static fields with ExtensionsState container for managing initialization status, instance names, and registered locks tracking.
Extension Tests Updates
src/ReactiveLock.Tests/ReactiveLockGrpcTrackerExtensionsTests.cs, src/ReactiveLock.Tests/ReactiveLockRedisTrackerExtensions.cs
Removed reflection-based state manipulation. Updated to use new InitializeDistributedGrpcReactiveLock DI extension. Converted Redis tests from void to async Task signatures.
Integration Test Backend Dockerfiles
test/integration/dotnet-csharp-grpc/src/backend/Dockerfile, test/integration/dotnet-csharp-redis/src/backend/Dockerfile
Updated base images from preview variants to stable .NET 10.0 versions (10.0.2-alpine3.22, 10.0.102-alpine3.22). Added local NuGet source handling and expanded build pipeline with explicit workdir, configuration variables, and restore validation.
Integration Test Dependencies and Configuration
test/integration/dotnet-csharp-grpc/src/backend/backend.csproj, test/integration/dotnet-csharp-redis/src/backend/...csproj, test/integration/.../haproxy.cfg, test/integration/dotnet-csharp-redis/src/backend/backend.http, test/integration/dotnet-csharp-redis/src/backend/Service/PaymentSummaryService.cs
Updated Microsoft.Extensions.Http.Polly to stable 10.0.0, changed haproxy ulimit-n from 555555 to 65000, updated test correlation ID, and fixed Redis deserialization with byte[] cast.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

  • PR #37: Adds identical .NET 10 upgrade steps to workflows and target frameworks—directly overlapping scope
  • PR #36: Refactors state management in distributed extensions and introduces InitializeDistributedGrpcReactiveLock overload—same core refactoring pattern

Poem

🐰 A rabbit's .NET ten update complete,
State containers make refactoring neat,
Docker builds with Alpine's stable ground,
Extension tests now shine without reflection's sound,
Integration flows from Redis to gRPC's space,
Hopping forward at a brisk, productive pace! 🎉

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 29.41% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Release/v1.1.0' is too vague and generic. It does not convey meaningful information about the actual changes in this comprehensive pull request, which include .NET 10 support, workflow updates, state management refactoring, and test improvements. Replace with a more descriptive title that captures the main changes, such as 'Add .NET 10 support and refactor distributed lock state management' or 'Release v1.1.0: Add .NET 10 support and state container refactoring'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

Comment @coderabbitai help to get the list of available commands and usage tips.

@micheloliveira-com micheloliveira-com changed the title ReactiveLock v1.1.0 Release/v1.1.0 Feb 3, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 3, 2026

@micheloliveira-com micheloliveira-com merged commit 9ec1caf into main Feb 3, 2026
7 of 8 checks passed
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/ReactiveLock.Tests/ReactiveLockRedisTrackerExtensions.cs (1)

32-47: ⚠️ Potential issue | 🟡 Minor

Reset Redis extension state after this test.

This test leaves the static ExtensionsState populated because it never calls UseDistributedRedisReactiveLockAsync, which can leak into other Redis tests and make them order-dependent. Consider clearing it in a finally block.

♻️ Suggested cleanup
 public async Task AddDistributedRedisReactiveLock_RegistersDependencies()
 {
     var services = new ServiceCollection();

     services.AddSingleton(Mock.Of<IConnectionMultiplexer>());
     services.AddSingleton(Mock.Of<IReactiveLockTrackerFactory>());

     services.InitializeDistributedRedisReactiveLock("instance-x");

     services.AddDistributedRedisReactiveLock("lock-x");

     var provider = services.BuildServiceProvider();
-        
-    // assert no registration failure
-    Assert.NotNull(provider.GetService<IConnectionMultiplexer>());
+    try
+    {
+        // assert no registration failure
+        Assert.NotNull(provider.GetService<IConnectionMultiplexer>());
+    }
+    finally
+    {
+        // clear static state for other tests
+        new ServiceCollection().InitializeDistributedRedisReactiveLock(string.Empty);
+    }
 }
🤖 Fix all issues with AI agents
In @.github/workflows/k6-test-single.yml:
- Around line 149-156: The "Append Docker Compose Logs" step runs an unguarded
`cd $PROJECT_FOLDER && docker compose logs` which can fail the job; remove that
unguarded invocation (or make it non-fatal) and rely on the guarded redirect
that appends to comment.md (the `cd $PROJECT_FOLDER && docker compose logs >>
comment.md || true` line) so the step never fails if `docker compose logs` exits
non-zero. Edit the step so only the guarded command runs (or add `|| true` /
`set +e` to the earlier call) to ensure the step cannot fail due to a non‑zero
exit from `docker compose logs`.

In `@src/ReactiveLock.Tests/ReactiveLockGrpcTrackerExtensionsTests.cs`:
- Around line 82-109: The test
AddDistributedGrpcReactiveLock_ThrowsWhenControllerAccessed initializes static
gRPC extension state but never clears it; wrap the Act & Assert in a try/finally
(or add a finally) and reset the static ExtensionsState (the class used by
InitializeDistributedGrpcReactiveLock/ AddDistributedGrpcReactiveLock) in the
finally so the static state is cleared after the test runs to avoid leaking into
other tests.

In `@test/integration/dotnet-csharp-grpc/src/backend/backend.csproj`:
- Line 15: Update the PackageReference for Microsoft.Extensions.Http.Polly in
the backend.csproj: locate the PackageReference element with
Include="Microsoft.Extensions.Http.Polly" and change its Version attribute from
"10.0.0" to "10.0.2" so the project uses the latest stable release.

In `@test/integration/dotnet-csharp-grpc/src/backend/Dockerfile`:
- Around line 9-16: The Dockerfile's aspnet base image reference ("FROM
mcr.microsoft.com/dotnet/aspnet:10.0.2-alpine3.22 AS base") uses a non-existent
tag; update that FROM line to a valid tag such as
"mcr.microsoft.com/dotnet/aspnet:10.0-alpine3.22" or
"mcr.microsoft.com/dotnet/aspnet:10.0-alpine" so the base image resolves,
keeping the existing SDK stage ("FROM
mcr.microsoft.com/dotnet/sdk:10.0.102-alpine3.22-aot AS build") and any
runtime-deps tags unchanged.

In `@test/integration/dotnet-csharp-redis/src/backend/backend.csproj`:
- Line 14: Update the Microsoft.Extensions.Http.Polly PackageReference version
from 10.0.0 to 10.0.2; locate the PackageReference element for
"Microsoft.Extensions.Http.Polly" in the project (the existing line with
PackageReference Include="Microsoft.Extensions.Http.Polly" Version="10.0.0") and
change the Version attribute to "10.0.2" so the project uses the latest stable
release.

In `@test/integration/dotnet-csharp-redis/src/backend/Dockerfile`:
- Line 9: The publish step is missing an explicit RuntimeIdentifier which can
cause inconsistent AOT builds; update the publish invocation (the dotnet publish
command referenced in the Dockerfile/build pipeline) to include
/p:RuntimeIdentifier=linux-musl-x64 or add
<RuntimeIdentifier>linux-musl-x64</RuntimeIdentifier> to the backend.csproj
alongside the existing <PublishAot>true</PublishAot> so the AOT SDK builds
target linux-musl explicitly; also plan to move off alpine3.22 to 3.23+ due to
end-of-support.

In
`@test/integration/dotnet-csharp-redis/src/backend/Service/PaymentSummaryService.cs`:
- Around line 52-54: The consumer is casting RedisValue to byte[] before
deserializing, but the producer serialized a string; in PaymentSummaryService
change the Select projection to treat the RedisValue as a string and call
JsonSerializer.Deserialize<PaymentInsertParameters>((string)v!,
JsonContext.Default.PaymentInsertParameters) (or use v.ToString()) instead of
casting to byte[] so the deserialization type matches the producer's
JsonSerializer.Serialize output.

Comment thread .github/workflows/k6-test-single.yml
Comment thread src/ReactiveLock.Tests/ReactiveLockGrpcTrackerExtensionsTests.cs
Comment thread test/integration/dotnet-csharp-grpc/src/backend/backend.csproj
Comment thread test/integration/dotnet-csharp-grpc/src/backend/Dockerfile
Comment thread test/integration/dotnet-csharp-redis/src/backend/backend.csproj
Comment thread test/integration/dotnet-csharp-redis/src/backend/Dockerfile
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.

1 participant