Dependabot/nuget/src/application/minor and patch 5e1fe4b923#39
Conversation
Bumps FluentValidation from 12.0.0 to 12.1.0 Bumps MediatR from 12.4.1 to 12.5.0 Bumps Microsoft.EntityFrameworkCore.Design from 8.0.11 to 8.0.21 Bumps Microsoft.Extensions.Caching.StackExchangeRedis from 8.0.0 to 8.0.21 Bumps Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore from 8.0.0 to 8.0.21 Bumps Npgsql.EntityFrameworkCore.PostgreSQL from 8.0.10 to 8.0.11 Bumps Swashbuckle.AspNetCore from 6.6.2 to 6.9.0 Bumps System.IdentityModel.Tokens.Jwt from 8.0.0 to 8.14.0 --- updated-dependencies: - dependency-name: FluentValidation dependency-version: 12.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: MediatR dependency-version: 12.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: Microsoft.EntityFrameworkCore.Design dependency-version: 8.0.21 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: Microsoft.Extensions.Caching.StackExchangeRedis dependency-version: 8.0.21 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore dependency-version: 8.0.21 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: Npgsql.EntityFrameworkCore.PostgreSQL dependency-version: 8.0.11 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: Swashbuckle.AspNetCore dependency-version: 6.9.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: System.IdentityModel.Tokens.Jwt dependency-version: 8.14.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] <support@github.com>
WalkthroughThis PR refactors the MediatR pipeline to propagate cancellation tokens consistently across behaviors, introduces an explicit Unit of Work pattern with transaction management via IUnitOfWork, and decouples domain events from MediatR by wrapping them in DomainEventNotification. Docker configuration shifts to remote database usage, and GCP deployment automation scripts are added. Changes
Sequence DiagramsequenceDiagram
participant Client
participant MediatR
participant Pipeline as Pipeline Behaviors
participant UnitOfWork
participant Handler as Command Handler
participant Events as Domain Events
participant Dispatcher
participant Notification as DomainEventNotification
Client->>MediatR: Send Command
MediatR->>Pipeline: Start Pipeline
rect rgba(100, 200, 100, 0.1)
Note over Pipeline: TransactionBehavior (moved after DomainEventBehavior)
Pipeline->>UnitOfWork: BeginTransactionAsync()
end
rect rgba(150, 150, 255, 0.1)
Note over Pipeline: Other Behaviors<br/>(all pass cancellationToken)
Pipeline->>Pipeline: Validate, Log, Cache, etc.
end
rect rgba(200, 100, 100, 0.1)
Note over Pipeline: DomainEventBehavior
Pipeline->>UnitOfWork: Check HasActiveTransaction
alt No Active Transaction
Pipeline->>UnitOfWork: SaveChangesAsync()
end
Pipeline->>Handler: next(cancellationToken)
end
Handler->>Events: Raise Domain Events
Handler-->>Pipeline: Return Response
rect rgba(100, 150, 200, 0.1)
Note over Pipeline: Post-Handler: Event Dispatch
Pipeline->>Events: Collect Events from Entities
Pipeline->>Dispatcher: Dispatch Events
loop For Each Domain Event
Dispatcher->>Notification: Create DomainEventNotification<T>
Dispatcher->>MediatR: Publish Notification
MediatR->>Handler: Notify Subscribed Handlers
end
end
rect rgba(100, 200, 100, 0.1)
Note over UnitOfWork: Transaction Completion
UnitOfWork->>UnitOfWork: SaveChangesAsync()
UnitOfWork->>UnitOfWork: CommitTransactionAsync()
end
Pipeline-->>MediatR: Response
MediatR-->>Client: Result
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Free 📒 Files selected for processing (29)
💤 Files with no reviewable changes (2)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
* Bump the minor-and-patch group with 8 updates Bumps FluentValidation from 12.0.0 to 12.1.0 Bumps MediatR from 12.4.1 to 12.5.0 Bumps Microsoft.EntityFrameworkCore.Design from 8.0.11 to 8.0.21 Bumps Microsoft.Extensions.Caching.StackExchangeRedis from 8.0.0 to 8.0.21 Bumps Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore from 8.0.0 to 8.0.21 Bumps Npgsql.EntityFrameworkCore.PostgreSQL from 8.0.10 to 8.0.11 Bumps Swashbuckle.AspNetCore from 6.6.2 to 6.9.0 Bumps System.IdentityModel.Tokens.Jwt from 8.0.0 to 8.14.0 --- updated-dependencies: - dependency-name: FluentValidation dependency-version: 12.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: MediatR dependency-version: 12.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: Microsoft.EntityFrameworkCore.Design dependency-version: 8.0.21 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: Microsoft.Extensions.Caching.StackExchangeRedis dependency-version: 8.0.21 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore dependency-version: 8.0.21 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: Npgsql.EntityFrameworkCore.PostgreSQL dependency-version: 8.0.11 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: Swashbuckle.AspNetCore dependency-version: 6.9.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: System.IdentityModel.Tokens.Jwt dependency-version: 8.14.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] <support@github.com> * fix: Remove dependecy MediatR at Domain project * feat: Refactor transaction handling and add deployment scripts for Google Cloud --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Summary by CodeRabbit
Release Notes
Chores