-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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/9.0-preview2] #98551 - Regression in DI scope validation #99010
[release/9.0-preview2] #98551 - Regression in DI scope validation #99010
Conversation
Tagging subscribers to this area: @dotnet/area-extensions-dependencyinjection Issue DetailsBackport of #98661 to release/9.0-preview2 /cc @carlossanlop @christiaanderidder Customer Impact
[Select one or both of the boxes. Describe how this issue impacts customers, citing the expected and actual behaviors and scope of the issue. If customer-reported, provide the issue number.] Regression
[If yes, specify when the regression was introduced. Provide the PR or commit if known.] Testing[How was the fix verified? How was the issue missed previously? What tests were added?] Risk[High/Medium/Low. Justify the indication by mentioning how risks were measured and addressed.] IMPORTANT: If this backport is for a servicing release, please verify that:
|
Failure in |
Approved by Tactics via email. |
Backport of #98661 to release/9.0-preview2
/cc @carlossanlop @christiaanderidder
Description
The automated dependency update PR from
runtime
toaspnetcore
is currently failing: dotnet/aspnetcore#54055Two tests were failing:
WebApplicationBuilder_EnablesServiceScopeValidationByDefaultInDevelopment
(https://github.com/dotnet/aspnetcore/blob/9db62024cbe3c3cb28efe372541fc1bdfcdb375e/src/DefaultBuilder/test/Microsoft.AspNetCore.Tests/WebApplicationTests.cs#L1784)Build_InDevelopment_ConfiguresWithServiceProviderWithScopeValidation
(https://github.com/dotnet/aspnetcore/blob/9db62024cbe3c3cb28efe372541fc1bdfcdb375e/src/Components/WebAssembly/WebAssembly/test/Hosting/WebAssemblyHostBuilderTest.cs#L95)In both cases the failure is of the form "expected an exception to be thrown, but no exception was thrown". Example of failing build: https://github.com/dotnet/aspnetcore/runs/21630956214
I notice that this started after #96254 was merged 2 days ago, and that PR changes the logic around service scope validation. The PR is not meant to affect the behavior (since it's only intended to add caching) but perhaps it does affect the behavior.
Reproduction Steps
Example of failing build: https://github.com/dotnet/aspnetcore/runs/21630956214
Expected behavior
Service scope validation behavior should be unchanged.
Actual behavior
It no longer throws at the same time that it did before.
Regression?
The behavior was correct in commit ad25468, which is the last one we successfully ingested to
dotnet/aspnetcore
. The change must have happened since then.Testing
Unit test included in the fix: #98661
Risk
Low (?)