Skip to content

[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

Merged
merged 36 commits into from
May 15, 2020

Conversation

dotnet-maestro-bot
Copy link
Contributor

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.

merge button instructions

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.

git fetch
git checkout release/3.1
git pull --ff-only
git checkout master
git pull --ff-only
git merge --no-ff release/3.1

# If there are merge conflicts, resolve them and then run git merge --continue to complete the merge
# Pushing the changes to the PR branch will re-trigger PR validation.
git push https://github.com/dotnet-maestro-bot/AspNetCore HEAD:merge/release/3.1-to-master
or if you are using SSH
git push [email protected]:dotnet-maestro-bot/AspNetCore HEAD:merge/release/3.1-to-master

After PR checks are complete push the branch

git push

Instructions for resolving conflicts

⚠️ If there are merge conflicts, you will need to resolve them manually before merging. You can do this using GitHub or using the command line.

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.

git checkout -b merge/release/3.1-to-master master
git pull https://github.com/dotnet-maestro-bot/AspNetCore merge/release/3.1-to-master
(make changes)
git commit -m "Updated PR with my changes"
git push https://github.com/dotnet-maestro-bot/AspNetCore HEAD:merge/release/3.1-to-master
or if you are using SSH
git checkout -b merge/release/3.1-to-master master
git pull [email protected]:dotnet-maestro-bot/AspNetCore merge/release/3.1-to-master
(make changes)
git commit -m "Updated PR with my changes"
git push [email protected]:dotnet-maestro-bot/AspNetCore HEAD:merge/release/3.1-to-master

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.

James Newton-King and others added 26 commits April 2, 2020 20:30
**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)
* 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
Copy link

@ghost ghost left a 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.

@ghost ghost added the auto-merge label May 13, 2020
@dotnet-maestro-bot
Copy link
Contributor Author

This pull request has been updated.

This PR merges commits made on release/3.1 by the following committers:

@ghost ghost removed the auto-merge label May 13, 2020
@dotnet-maestro-bot
Copy link
Contributor Author

This pull request has been updated.

This PR merges commits made on release/3.1 by the following committers:

1 similar comment
@dotnet-maestro-bot
Copy link
Contributor Author

This pull request has been updated.

This PR merges commits made on release/3.1 by the following committers:

dougbu and others added 2 commits May 13, 2020 11:31
* 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
@dotnet-maestro-bot
Copy link
Contributor Author

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
@dotnet-maestro-bot
Copy link
Contributor Author

This pull request has been updated.

This PR merges commits made on release/3.1 by the following committers:

@NTaylorMullen
Copy link

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" />
Copy link
Contributor

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

@@ -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"
Copy link
Contributor

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.

Copy link
Contributor

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'.

Copy link
Contributor

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 😄

@jkotalik
Copy link
Contributor

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.

@dougbu
Copy link
Contributor

dougbu commented May 14, 2020

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).

@dotnet-maestro-bot
Copy link
Contributor Author

❌ 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.
You may need to fix this problem by merging branches with this PR. Contact .NET Core Engineering if you are not sure what to do about this.

1 similar comment
@dotnet-maestro-bot
Copy link
Contributor Author

❌ 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.
You may need to fix this problem by merging branches with this PR. Contact .NET Core Engineering if you are not sure what to do about this.

@jkotalik jkotalik merged commit 54b1062 into dotnet:master May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework Type: Merge Forward ⏩
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants