-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(app): Add dedicated scope and dbcontext to GetSubjectResources #1648
fix(app): Add dedicated scope and dbcontext to GetSubjectResources #1648
Conversation
📝 WalkthroughWalkthroughThe pull request modifies the Changes
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/Digdir.Domain.Dialogporten.Infrastructure/Altinn/Authorization/AltinnAuthorizationClient.cs
(5 hunks)
🔇 Additional comments (4)
src/Digdir.Domain.Dialogporten.Infrastructure/Altinn/Authorization/AltinnAuthorizationClient.cs (4)
13-15
: Imports introduced for persistence and service scope creation
The new using statements forDigdir.Domain.Dialogporten.Infrastructure.Persistence
andMicrosoft.Extensions.DependencyInjection
appear correct and necessary for the newly introduced scope factory andDialogDbContext
.
32-32
: Acknowledgment: Adding_serviceScopeFactory
Introducing a private read-only field for the scope factory is a good approach for managing scoped dependencies (e.g.,DialogDbContext
) within the client.
45-46
: Constructor update to injectIServiceScopeFactory
Including theIServiceScopeFactory
parameter in the constructor ensures the necessary resources are obtained for the new scoped usage. This aligns with dependency injection best practices.
55-55
: Null check forserviceScopeFactory
The null check promotes good defensive coding. Nothing else needed here.
src/Digdir.Domain.Dialogporten.Infrastructure/Altinn/Authorization/AltinnAuthorizationClient.cs
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
🤖 I have created a release *beep* *boop* --- ## [1.43.0](v1.42.1...v1.43.0) (2025-01-07) ### Features * Add additional types to DialogActivity ([#1629](#1629)) ([feb1347](feb1347)) ### Bug Fixes * **app:** Add dedicated scope and dbcontext to GetSubjectResources ([#1648](#1648)) ([d1040e4](d1040e4)) * revert azure monitor workspace ([#1624](#1624)) ([d66b155](d66b155)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Add dedicated scope and dbcontext to GetSubjectResources to avoid concurrency errors
Description
Related Issue(s)
Verification
Documentation
docs
-directory, Altinnpedia or a separate linked PR in altinn-studio-docs., if applicable)