-
Notifications
You must be signed in to change notification settings - Fork 345
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
Register Dapr services in keyed-compatible manner #1238
Conversation
Signed-off-by: Phillip Hoff <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1238 +/- ##
==========================================
- Coverage 67.36% 67.28% -0.09%
==========================================
Files 174 174
Lines 6028 6025 -3
Branches 672 671 -1
==========================================
- Hits 4061 4054 -7
- Misses 1800 1802 +2
- Partials 167 169 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@halspang Would appreciate a quick review when you have a chance, thanks! |
Hello! I hope this helps: from further investigation, we found out that the offending dependency is with library When using that library, the My Team and I really appreciete your effor guys for providing an update for this. Thank you. |
When is this getting released (non-preview)? |
@onionhammer It will be released as part of the larger Dapr 1.13 release, coming very soon. |
Signed-off-by: Phillip Hoff <[email protected]> Signed-off-by: Divya Perumal <[email protected]>
Description
.NET 8 adds the ability to register "keyed" services with a service collection. The implementation of this feature, however, breaks how many existing components look through that service collection to determine whether they've been previously registered (a common if, perhaps, now an anti-pattern with the advent of
TryAddSingleton()
). If a component registers a keyed service before another component performs such a search, that search cause an exception to be thrown.The Dapr .NET SDK uses this "old" style of registering "marker" services to help prevent multiple registrations, which triggers this new behavior in .NET 8. This change switches to the newer
TryAddSingleton()
approach to avoid that problem.Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #1235
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: