-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[automated] Merge branch 'release/3.1' => 'master' #21791
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
[automated] Merge branch 'release/3.1' => 'master' #21791
Conversation
**Description** An infinite loop can happen in routing if there is a catch all route with host name matching. This problem is caused by the DFA matcher builder giving an incorrect exit destination to policies. Currently the exit destination is the catch all state, so the policy will transition to itself when there is no match. It will run again, transition to itself again, run again, etc. This causes the policy to run forever. What should happen is the host name policy fails, it transitions to the final state with no candidates, and the route matcher does not match any endpoints. The browser is returned a 404 status. **Customer Impact** This problem shows up in this situation: 1. If a customer has configured a catch all route in their app 2. The catch all route has host matching 3. A browser makes a request to the server that matches the catch all route but doesn't match the host name The route matcher will run forever, using up a threadpool thread. When threadpool threads are exhausted the server will stop responding. **Regression?** No. **Risk** Medium. The fix is simple but route matching is complex, and routing runs with every request.
Avoid caching JsonSerializer
…ositories This pull request updates the following dependencies [marker]: <> (Begin:7bf32a0c-3505-43af-42b0-08d79559e63d) ## From https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore-tooling - **Subscription**: 7bf32a0c-3505-43af-42b0-08d79559e63d - **Build**: 20200414.7 - **Date Produced**: 4/15/2020 5:37 AM - **Commit**: 06ade7a064cbdcf80aa6457541c1a99b7e39b5a8 - **Branch**: refs/heads/internal/release/3.1 - **Updates**: - **Microsoft.AspNetCore.Mvc.Razor.Extensions**: from 3.1.3 to 3.1.4 - **Microsoft.AspNetCore.Razor.Language**: from 3.1.3 to 3.1.4 - **Microsoft.CodeAnalysis.Razor**: from 3.1.3 to 3.1.4 - **Microsoft.NET.Sdk.Razor**: from 3.1.3 to 3.1.4 [marker]: <> (End:7bf32a0c-3505-43af-42b0-08d79559e63d) [marker]: <> (Begin:Coherency Updates) ## Coherency Updates The following updates ensure that dependencies with a *CoherentParentDependency* attribute were produced in a build used as input to the parent dependency's build. See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview) - **Microsoft.AspNetCore.Analyzer.Testing**: from 3.1.4-servicing.20181.5 to 3.1.4-servicing.20202.2 (parent: Microsoft.EntityFrameworkCore) - **Microsoft.AspNetCore.BenchmarkRunner.Sources**: from 3.1.4-servicing.20181.5 to 3.1.4-servicing.20202.2 (parent: Microsoft.EntityFrameworkCore) - **Microsoft.Extensions.ActivatorUtilities.Sources**: from 3.1.4-servicing.20181.5 to 3.1.4-servicing.20202.2 (parent: Microsoft.EntityFrameworkCore) - **Microsoft.Extensions.CommandLineUtils.Sources**: from 3.1.4-servicing.20181.5 to 3.1.4-servicing.20202.2 (parent: Microsoft.EntityFrameworkCore) - **Microsoft.Extensions.HashCodeCombiner.Sources**: from 3.1.4-servicing.20181.5 to 3.1.4-servicing.20202.2 (parent: Microsoft.EntityFrameworkCore) - **Microsoft.Extensions.HostFactoryResolver.Sources**: from 3.1.4-servicing.20181.5 to 3.1.4-servicing.20202.2 (parent: Microsoft.EntityFrameworkCore) - **Microsoft.Extensions.Logging.Testing**: from 3.1.4-servicing.20181.5 to 3.1.4-servicing.20202.2 (parent: Microsoft.EntityFrameworkCore) - **Microsoft.Extensions.ParameterDefaultValue.Sources**: from 3.1.4-servicing.20181.5 to 3.1.4-servicing.20202.2 (parent: Microsoft.EntityFrameworkCore) - **Microsoft.Extensions.TypeNameHelper.Sources**: from 3.1.4-servicing.20181.5 to 3.1.4-servicing.20202.2 (parent: Microsoft.EntityFrameworkCore) - **Microsoft.Extensions.ValueStopwatch.Sources**: from 3.1.4-servicing.20181.5 to 3.1.4-servicing.20202.2 (parent: Microsoft.EntityFrameworkCore) - **Microsoft.NETCore.App.Internal**: from 3.1.4-servicing.20181.2 to 3.1.4-servicing.20202.1 (parent: Microsoft.Extensions.Logging) - **Internal.AspNetCore.Analyzers**: from 3.1.4-servicing.20181.5 to 3.1.4-servicing.20202.2 (parent: Microsoft.EntityFrameworkCore) - **Microsoft.AspNetCore.Testing**: from 3.1.4-servicing.20181.5 to 3.1.4-servicing.202 ...
Update dependencies from EFCore
…ositories This pull request updates the following dependencies [marker]: <> (Begin:7bf32a0c-3505-43af-42b0-08d79559e63d) ## From https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore-tooling - **Subscription**: 7bf32a0c-3505-43af-42b0-08d79559e63d - **Build**: 20200415.2 - **Date Produced**: 4/15/2020 6:12 PM - **Commit**: a49970f2f15efb27b91541bb4b94581693c92b8d - **Branch**: refs/heads/internal/release/3.1 - **Updates**: - **Microsoft.AspNetCore.Mvc.Razor.Extensions**: from 3.1.4 to 3.1.4 - **Microsoft.AspNetCore.Razor.Language**: from 3.1.4 to 3.1.4 - **Microsoft.CodeAnalysis.Razor**: from 3.1.4 to 3.1.4 - **Microsoft.NET.Sdk.Razor**: from 3.1.4 to 3.1.4 [marker]: <> (End:7bf32a0c-3505-43af-42b0-08d79559e63d)
Update dependencies from efcore
…ositories This pull request updates the following dependencies [marker]: <> (Begin:Coherency Updates) ## Coherency Updates The following updates ensure that dependencies with a *CoherentParentDependency* attribute were produced in a build used as input to the parent dependency's build. See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview) - **System.Net.Http.WinHttpHandler**: from 4.7.0 to 4.7.1 (parent: Microsoft.NETCore.App.Runtime.win-x64) [marker]: <> (End:Coherency Updates) [marker]: <> (Begin:7bf32a0c-3505-43af-42b0-08d79559e63d) ## From https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore-tooling - **Subscription**: 7bf32a0c-3505-43af-42b0-08d79559e63d - **Build**: 20200422.2 - **Date Produced**: 4/22/2020 7:47 PM - **Commit**: a8242d79df31dbff528c185dd62c290b7cc262de - **Branch**: refs/heads/internal/release/3.1 - **Updates**: - **Microsoft.AspNetCore.Mvc.Razor.Extensions**: from 3.1.4 to 3.1.4 - **Microsoft.AspNetCore.Razor.Language**: from 3.1.4 to 3.1.4 - **Microsoft.CodeAnalysis.Razor**: from 3.1.4 to 3.1.4 - **Microsoft.NET.Sdk.Razor**: from 3.1.4 to 3.1.4 - **System.Net.Http.WinHttpHandler**: from 4.7.0 to 4.7.1 [marker]: <> (End:7bf32a0c-3505-43af-42b0-08d79559e63d)
Update branding to 3.1.5
* Add .version file to shared framework zip * Fix test
…21200) * Fix use of precedence in endpoint routing DFA Fixes: dotnet#18677 Fixes: dotnet#16579 This is a change to how sorting is use when building endpoint routing's graph of nodes that is eventually transformed into the route table. There were bugs in how this was done that made it incompatible in some niche scenarios both with previous implementations and how we describe the features in the abstract. There are a wide array of cases that might have been impacted by this bug because routing is a pattern language. Generally the bugs will involve a catch-all, and some something that changes ordering of templates. Issue dotnet#18677 has the simplest repro for this, the following templates would not behave as expected: ``` a/{*b} {a}/{b} ``` One would expect any URL Path starting with `/a` to match the first route, but that's not what happens. --- The change supports an opt-in via the following AppContext switch: ``` Microsoft.AspNetCore.Routing.UseCorrectCatchAllBehavior ``` Set to true to enable the correct behavior. --- The root cause of this bug was an issue in how the algorithm used to be build the DFA was designed. Specifically that it uses a BFS to build the graph, and it uses an up-front one-time sort of endpoints in order to drive that BFS. The building of the graph has the expectation that at each level, we will process **all** literal segments (`/a`) and then **all** parameter segments (`/{a}`) and then **all** catch-all segments (`/{*a}`). Routing defines a concept called *precedence* that defines the *conceptual* order in while segments types are ordered. So there are two problems: - We sort based on criteria other than precedence (dotnet#16579) - We can't rely on a one-time sort, it needs to be done at each level (dotnet#18677) --- The fix is to repeat the sort operation at each level and use precedence as the only key for sorting (as dictated by the graph building algo). We do a sort of the matches of each node *after* building the precedence-based part of the DFA, based on the full sorting criteria, to maintain compatibility. * Add test
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.
Auto-approving branch merge.
This pull request has been updated. This PR merges commits made on release/3.1 by the following committers: |
This pull request has been updated. This PR merges commits made on release/3.1 by the following committers: |
1 similar comment
This pull request has been updated. This PR merges commits made on release/3.1 by the following committers: |
* Improve build reliability - ensure `ResolveCustomReferences` target executes before packages are used - `ResolveAssemblyReferences` and `ResolveAssemblyReferencesDesignTime` targets run too late - e.g. failed builds of Microsoft.AspNetCore.WebUtilities or Microsoft.AspNetCore.Hosting when building from root - add `GetReferenceProjectTargetPathMetadata` for ease of use as well as reliability - avoids extra work to get existing metadata (ref/ projects execute no tasks in this target) nit: rename `@(ReferenceProjectMetadata)` -> `@(ReferenceProjectTargetPathMetadata)` * Ensure `GetTargetPathMetadata` target runs with `$(TargetFramework)` set - ref/ projects all multi-target and otherwise no-op this target * Revert "Fix various "Type or namespace not found" errors (dotnet#20736)" - change is no longer needed with other fixes in this PR This reverts commit 8218d6e.
…ct (dotnet#21753) * Change template test build and publish to not perform dotnet restore * Remove locking requirements for build and publish * Increase timeout for dotnet new operations since it's network bound
This pull request has been updated. This PR merges commits made on release/3.1 by the following committers: |
* Move SDL validation to ringed release * Remove unneeded stuff * Add back variables * fixup * Add missing param
This pull request has been updated. This PR merges commits made on release/3.1 by the following committers: |
Attempted to address all of the merge conflicts but hollllllly there was a lot. Hoping I got everything! |
@@ -22,6 +22,7 @@ Microsoft.AspNetCore.Http.HttpResponse</Description> | |||
|
|||
<ItemGroup> | |||
<Reference Include="Microsoft.AspNetCore.Http.Features" /> | |||
<Reference Include="Microsoft.Extensions.ActivatorUtilities.Sources" /> |
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.
This is a shared source in master
…sue is resolved." This reverts commit 9a5d3c7.
…et-maestro-bot/AspNetCore into merge/release/3.1-to-master
…et-maestro-bot/AspNetCore into merge/release/3.1-to-master
@@ -132,7 +132,9 @@ | |||
This target resolves remaining Referene items to Packages, if possible. If not, they are left as Reference items fo the SDK to resolve. | |||
This executes on NuGet restore and during DesignTimeBuild. It should not run in the outer, cross-targeting build. | |||
--> | |||
<Target Name="ResolveCustomReferences" BeforeTargets="CollectPackageReferences;ResolveAssemblyReferencesDesignTime;ResolveAssemblyReferences" Condition=" '$(TargetFramework)' != '' AND '$(EnableCustomReferenceResolution)' == 'true' "> | |||
<Target Name="ResolveCustomReferences" | |||
BeforeTargets="CheckForImplicitPackageReferenceOverrides;CollectPackageReferences;ResolvePackageAssets" |
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.
@dougbu should this logic be merged forward from 3.1 to 5.0? It's causing a bunch of failures on CI.
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.
This change should be fine but none of the added block just below should be in 'master'.
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.
Deleting from line 219 to 265 then 😄
I believe that #20760 is causing issues in master currently that need to be resolved. I chatted with @JunTaoLuo and he said he was uncertain if that PR should be merged into master. If it should be merged into master, there will be a solid amount of reactionary work. |
Just undo the one block. That should fix things unless there's been a significant change to the SDK targets (and I don't believe that's happened). |
❌ Uh oh, this pull request could not be updated automatically. New commits were pushed to release/3.1, but I could not automatically push those to merge/release/3.1-to-master to update this PR. |
1 similar comment
❌ Uh oh, this pull request could not be updated automatically. New commits were pushed to release/3.1, but I could not automatically push those to merge/release/3.1-to-master to update this PR. |
I detected changes in the release/3.1 branch which have not been merged yet to master. I'm a robot and am configured to help you automatically keep master up to date, so I've opened this PR.
This PR merges commits made on release/3.1 by the following committers:
Instructions for merging from UI
This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, not a squash or rebase commit.
If this repo does not allow creating merge commits from the GitHub UI, use command line instructions.
Instructions for merging via command line
Run these commands to merge this pull request from the command line.
or if you are using SSH
After PR checks are complete push the branch
Instructions for resolving conflicts
Instructions for updating this pull request
Contributors to this repo have permission update this pull request by pushing to the branch 'merge/release/3.1-to-master'. This can be done to resolve conflicts or make other changes to this pull request before it is merged.
or if you are using SSH
Contact .NET Core Engineering if you have questions or issues.
Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/master/scripts/GitHubMergeBranches.ps1.