Skip to content
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

[release/6.0-preview6] Fix the slot calculation for multiple services #54503

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 21, 2021

Backport of #54462 to release/6.0-preview6

/cc @davidfowl

Customer Impact

By default customers using DI in .NET 5 could be broken in very bad ways if any dependency in their application (including library dependencies) inject an IEnumerable<T> with more than 5 services into their constructor. They'll end up with the wrong set of dependencies. We've already had 2 customers report this on the new .NET 5 preview. This happens in development mode only by default since that's when the service validation feature is on.

This is a regression in preview5.

Testing

Added explicit tests for this scenario up to 6 services (from 1 to 6). Also added tests that verify the slot calculation (which is an internal detail that caused this to break).

Risk

Low/None.

… was not correct for more than 5 services. - Added tests to verify the slot calculation and service resolution.
@ghost
Copy link

ghost commented Jun 21, 2021

Tagging subscribers to this area: @eerhardt, @maryamariyan
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #54462 to release/6.0-preview6

/cc @davidfowl

Customer Impact

Testing

Risk

Author: github-actions[bot]
Assignees: -
Labels:

area-Extensions-DependencyInjection

Milestone: -

@kevinchalet
Copy link
Contributor

In the same vein, it would be nice to update https://github.com/dotnet/core/blob/main/release-notes/6.0/known-issues.md to mention this issue so that folks don't spend too much time chasing this nasty bug 😄

@davidfowl
Copy link
Member

@danmoseley can you unblock this one? It was approved

@danmoseley
Copy link
Member

Failure is #50270 ... any theory @davidfowl ? I couldn't find it.

@danmoseley
Copy link
Member

Hmm, I apparently don't have power to merge though. @ericstj do I need admin rights?

@davidfowl
Copy link
Member

Failure is #50270 ... any theory @davidfowl ? I couldn't find it.

Nothing to do with this PR 😄 . Re-running.

@danmoseley
Copy link
Member

Yes certainly, the issue is old. I was just wondering whether you had a theory about the cause - you see I looked in the past and added notes in there. Perhaps you're familiar with that code.

@davidfowl
Copy link
Member

@kevinchalet dotnet/core#6402

@danmoseley danmoseley merged commit d466dfb into release/6.0-preview6 Jun 22, 2021
@danmoseley danmoseley deleted the backport/pr-54462-to-release/6.0-preview6 branch June 22, 2021 16:03
@ghost ghost locked as resolved and limited conversation to collaborators Jul 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants