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

[master] Get IndividualAuth template tests working on Helix #26776

Closed
dougbu opened this issue Oct 10, 2020 · 5 comments · Fixed by #26823
Closed

[master] Get IndividualAuth template tests working on Helix #26776

dougbu opened this issue Oct 10, 2020 · 5 comments · Fixed by #26823
Assignees
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates Done This issue has been fixed test-failure
Milestone

Comments

@dougbu
Copy link
Member

dougbu commented Oct 10, 2020

Tests may be failing on Helix because they do not have the TemplateTests.props overrides in their environment. Binary logs clearly show the published projects are building using the SDKs default, 5.0.0 version of Microsoft.AspNetCore.App and not the just-built version e.g. …\e\sdk294\x64\packs\Microsoft.AspNetCore.App.Ref\5.0.0-rc.2.20466.8\ref\net5.0\Microsoft.AspNetCore.Http.Abstractions.dll. Not sure why the problem is specific to IndividualAuth tests.

Error:

...\e\Templates\BaseFolder\AspNet.jvkjhfr1m0h\Startup.cs(45,17): error CS1705: Assembly 'Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore' with identity 'Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore, Version=42.42.42.42, Culture=neutral, PublicKeyToken=adb9793829ddae60' uses 'Microsoft.AspNetCore.Http.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' which has a higher version than referenced assembly 'Microsoft.AspNetCore.Http.Abstractions' with identity 'Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' [...\e\Templates\BaseFolder\AspNet.jvkjhfr1m0h\AspNet.jvkjhfr1m0h.csproj]

Specific tests skipped in #24983:

  • Templates.Test.IdentityUIPackageTest.IdentityUIPackage_WorksWithDifferentOptions()
  • Templates.Test.MvcTemplateTest.MvcTemplate_IndividualAuth(useLocalDB: False)
  • Templates.Test.MvcTemplateTest.MvcTemplate_IndividualAuth(useLocalDB: True)
  • Templates.Test.RazorPagesTemplateTest.RazorPagesTemplate_IndividualAuth(useLocalDB: False)
  • Templates.Test.RazorPagesTemplateTest.RazorPagesTemplate_IndividualAuth(useLocalDB: True)

Details are available in https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-aspnetcore-refs-pull-24983-merge-b23d059ca16f4f5fb9/ProjectTemplates.Tests--net5.0/AspNet.di2py1qzril.binlog for example. See build https://dev.azure.com/dnceng/public/_build/results?buildId=836250 for other examples.

When restoring these tests after fixing them, note all previously had [SkipOnHelix("cert failure", Queues = "All.OSX")] applied.

@dougbu dougbu added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Oct 10, 2020
dougbu added a commit that referenced this issue Oct 10, 2020
@HaoK
Copy link
Member

HaoK commented Oct 10, 2020

Probably specific to Individual auth due to the fact that they depend on EF

@dougbu
Copy link
Member Author

dougbu commented Oct 10, 2020

Maybe @HaoK but I suspect the difference is really about depending on something not in the shared framework but built in the dotnet/aspnetcore repo. That is, the real problem is all of the template tests run against the Microsoft.AspNetCore.App assemblies included in the SDK rather than what we just built.

The problem will very likely be hidden automatically once the SDK includes dotnet/aspnetcore assemblies with 6.0.0.0 assembly versions. But, it's a real problem after that point nonetheless. Means we're only testing the templates completely in the project template tests that run on build agents.

@ghost
Copy link

ghost commented Oct 12, 2020

Thanks for contacting us.
We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

dougbu added a commit that referenced this issue Oct 12, 2020
* Update branding to 6.0.0 Alpha1
- hold the TFM back at `net5.0`
- correct `TargetFrameworkVersion` in FrameworkList.xml; don't use `$(AspNetCoreMajorMinorVersion)`
- move `$(DefaultNetCoreTargetFramework)` to eng/Versions.props
  - avoid repeating value in AfterSolutionBuild.targets and Directory.Build.props files
- add new versions to `TemplatePackageInstaller`
- update project template test scripts

* Update / add 6.0 package versions in test expectations
- basically, remove test assumptions that branding == target TFM
- `TestData` will need another update once 6.0.0.0 assembly versions arrive from dotnet/runtime

* Update `Condition`s on `@(SuppressBaselineReference)` items to 6.0

* Undo some of #24816
- allow sharedFx assemblies in Microsoft.AspNetCore.Components.WebAssembly.DevServer package
- see #26448 about reducing this baggage later in 6.0

* Skip IndividualAuth tests on Helix
- #26776
@HaoK
Copy link
Member

HaoK commented Oct 28, 2020

@dougbu looks like your changes, or something else has resolved the issue with these tests, is there any follow up work that needs to be done here other than reenabling the tests, or did you take care of that in the dependency update PR?

@dougbu
Copy link
Member Author

dougbu commented Oct 28, 2020

@HaoK my changes in #26788 likely fixed things. They certainly made so that template test projects now build and run against the just-built Microsoft.AspNetCore.App.* assemblies. But, no, I didn't reenable the tests in that PR.

Suggest updating the title and description of #26823 and making it non-Draft.

@HaoK HaoK added the Done This issue has been fixed label Oct 28, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Nov 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates Done This issue has been fixed test-failure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants