Skip to content

[release/5.0] Update dependencies from dotnet/arcade #36838

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

Conversation

dotnet-maestro[bot]
Copy link
Contributor

This pull request updates the following dependencies

From https://github.com/dotnet/arcade

  • Subscription: f918d9d3-5a78-4954-eaff-08d86aff023e
  • Build: 20210921.4
  • Date Produced: September 21, 2021 7:50:02 PM UTC
  • Commit: f2ebec887288367b18d3299cce38ae3365215555
  • Branch: refs/heads/release/5.0
  • Updates to .NET SDKs:
    • Updates sdk.version to 5.0.401
    • Updates tools.dotnet to 5.0.401

…921.4

Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk
 From Version 5.0.0-beta.21427.7 -> To Version 5.0.0-beta.21471.4
@dotnet-maestro dotnet-maestro bot requested review from dougbu, Pilchie and a team as code owners September 22, 2021 14:24
@ghost ghost added area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework Type: Dependency Update 🔼 labels Sep 22, 2021
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 dependency update.

@mmitche
Copy link
Member

mmitche commented Sep 22, 2021

@dougbu @wtgodbe Can you take a look at these failures? I think we may need this to ship 5.0 in Oct

@wtgodbe
Copy link
Member

wtgodbe commented Sep 22, 2021

All template test failures:

System.InvalidOperationException : Failed to uninstall previous templates. The template 'web' could still be found.

@pranavkm @javiercn @SteveSandersonMS could you take a look?

@wtgodbe
Copy link
Member

wtgodbe commented Sep 22, 2021

Looks like it's here:

await VerifyCannotFindTemplateAsync(output, "web");

@dougbu
Copy link
Contributor

dougbu commented Sep 22, 2021

I think we may need this to ship 5.0 in Oct

Because the VS on our agents may be too new for the 5.0.207 SDK❔ Or, is there something else in the newer Arcade we likely need❔

@mmitche
Copy link
Member

mmitche commented Sep 22, 2021

I think we may need this to ship 5.0 in Oct

Because the VS on our agents may be too new for the 5.0.207 SDK❔ Or, is there something else in the newer Arcade we likely need❔

Ahh I misread the SDK in use. This repo should be fine. Carry on.

@dougbu
Copy link
Contributor

dougbu commented Sep 24, 2021

It should hurt to update the SDK once our VS agents target v16.11 but the SDK change is breaking, bringing in something that regresses our required template removals in tests. I'm very surprised to have something like this required in a "regular" Arcade update. Was this announced in some forum❔

@wli3 @dsplaisted @marcpopMSFT what reaction is necessary to handle the breaking change in template removal (and perhaps installation as well)❔

/fyi we keep ahead of Arcade's minimum SDK in every round of branding updates. I'm not thrilled to have the two tied together. (Yeah, I'm agreeing w/ @ViktorHofer here.)

/cc @markwilkie for awareness of the breaking change in the Arcade SDK

@dsplaisted
Copy link
Member

@dougbu What is the breaking change? Previously you could remove (built-in?) project templates, but now you can't?

I know there are changes to the template system in 6.0, but I wouldn't expect something to have changed in 5.0.

@phenning @KathleenDollard @dotnet/templating-engine-maintainers

@dougbu
Copy link
Contributor

dougbu commented Sep 24, 2021

Error message

System.InvalidOperationException : Failed to uninstall previous templates. The template 'web' could still be found.
Sample stack
   at Templates.Test.Helpers.TemplatePackageInstaller.VerifyCannotFindTemplateAsync(ITestOutputHelper output, String templateName) in /_/src/ProjectTemplates/Shared/TemplatePackageInstaller.cs:line 185
   at Templates.Test.Helpers.TemplatePackageInstaller.InstallTemplatePackages(ITestOutputHelper output) in /_/src/ProjectTemplates/Shared/TemplatePackageInstaller.cs:line 138
   at Templates.Test.Helpers.TemplatePackageInstaller.EnsureTemplatingEngineInitializedAsync(ITestOutputHelper output) in /_/src/ProjectTemplates/Shared/TemplatePackageInstaller.cs:line 69
   at Templates.Test.Helpers.ProjectFactoryFixture.GetOrCreateProject(String projectKey, ITestOutputHelper output) in /_/src/ProjectTemplates/Shared/ProjectFactoryFixture.cs:line 55
   at Templates.Test.WebApiTemplateTest.PublishAndBuildWebApiTemplate(String languageOverride, String auth, String[] args) in /_/src/ProjectTemplates/test/WebApiTemplateTest.cs:line 72
--- End of stack trace from previous location ---

Likely culprit

The TemplatePackageInstaller is rather different in our 'release/5.0' and 'main' branches. Here, the relevant bits are

var proc = await RunDotNetNew(output, "--uninstall --help");
var lines = proc.Output.Split(Environment.NewLine);
// Remove any previous or prebundled version of the template packages
foreach (var packageName in _templatePackages)
{
// Depending on the ordering, there may be multiple matches:
// Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0.3.0.0-preview7.*.nupkg
// Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0.0-preview7.*.nupkg
// Error on the side of caution and uninstall all of them
foreach (var command in lines.Where(l => l.Contains("dotnet new") && l.Contains(packageName, StringComparison.OrdinalIgnoreCase)))
{
var uninstallCommand = command.TrimStart();
Debug.Assert(uninstallCommand.StartsWith("dotnet new"));
uninstallCommand = uninstallCommand.Substring("dotnet new".Length);
await RunDotNetNew(output, uninstallCommand);
}
}
await VerifyCannotFindTemplateAsync(output, "web");

var result = await RunDotNetNew(output, $"--install \"{packagePath}\"");

public static async Task<ProcessEx> RunDotNetNew(ITestOutputHelper output, string arguments)
{
var proc = ProcessEx.Run(
output,
AppContext.BaseDirectory,
DotNetMuxer.MuxerPathOrDefault(),
$"new {arguments} --debug:custom-hive \"{CustomHivePath}\"");
await proc.Exited;
return proc;
}

In 'main', we use --debug:disable-sdk-templates --debug:custom-hive \"{CustomHivePath}\", not just --debug:custom-hive \"{CustomHivePath}\" and delete the custom hive instead of uninstalling anything.

Note

The addition of --debug:disable-sdk-templates broke us a while ago. I'm surprised something similar is happening w/ a 5.0.x SDK.

Another cc

@pranavkm

@vlada-shubina
Copy link
Member

We haven't done any changes to 5.0 in a while. You definitely don't need --debug:disable-sdk-templates in 5.0

@dougbu
Copy link
Contributor

dougbu commented Sep 26, 2021

We haven't done any changes to 5.0 in a while. You definitely don't need --debug:disable-sdk-templates in 5.0

Could you please help us understand why the template tests are failing then❔ I'll put up a draft PR in a few minutes moving 'release/5.0' to the latest SDK but not changing anything about Arcade to confirm the v5.0.207 -> v5.0.401 change is what's breaking us.

@dougbu
Copy link
Contributor

dougbu commented Sep 26, 2021

@dougbu
Copy link
Contributor

dougbu commented Sep 26, 2021

Errors like the following failed numerous template tests due solely to the switch to use the 5.0.401 SDK. E.g. from https://dev.azure.com/dnceng/public/_build/results?buildId=1387068&view=ms.vss-test-web.build-test-results-tab&runId=40385670&resultId=100002&paneView=debug:

System.InvalidOperationException : Failed to uninstall previous templates. The template 'web' could still be found.

As you can see in #36989, I changed only the SDK. There is a breaking change between 5.0.207 and 5.0.401. Is this a bug that should be addressed in 5.0.402❔ If not, what is the workaround❔

@dougbu
Copy link
Contributor

dougbu commented Sep 26, 2021

/fyi every Blazor and project template test is failing with the minor exception of skipped tests and a couple of project template tests that don't attempt to install templates (they just check byte order marks).

@vlada-shubina
Copy link
Member

vlada-shubina commented Sep 27, 2021

I added the fix in #37011, CI is in progress now; however templates job passed.

Basically it modifies VerifyCannotFindTemplateAsync same as main branch now:
https://github.com/dotnet/aspnetcore/blob/main/src/ProjectTemplates/Shared/TemplatePackageInstaller.cs#L142-L161

We removed search for the templates on missing template in .NET 5.0.3xx with introducing --search option instead.

@DavidKarlas
Copy link
Contributor

I pushed @vlada-shubina commit to this branch to get green build asap...

@dougbu
Copy link
Contributor

dougbu commented Sep 27, 2021

Reran failed jobs in 20210927.16 because I don't want to wait for any quarantining (and we tend not to do much quarantining in servicing branches anyhow).

@dotnet-maestro dotnet-maestro bot merged commit 3628abc into release/5.0 Sep 27, 2021
@dotnet-maestro dotnet-maestro bot deleted the darc-release/5.0-23feed3d-94a1-403b-9cc0-9608bb4f7f75 branch September 27, 2021 20:26
@wtgodbe
Copy link
Member

wtgodbe commented Sep 27, 2021

Darn it. Cancelling builds now

@dougbu
Copy link
Contributor

dougbu commented Sep 27, 2021

Thanks for catching things before builds got too far @wtgodbe ☹️

@dougbu dougbu added this to the 5.0.12 milestone Oct 5, 2021
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: Dependency Update 🔼
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants