-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Workload manifest updates #16891
Workload manifest updates #16891
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
9a402f8
to
b51159e
Compare
src/Cli/dotnet/commands/dotnet-workload/install/NetSdkManagedInstaller.cs
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/ManifestVersion.cs
Outdated
Show resolved
Hide resolved
src/Resolvers/Microsoft.DotNet.NativeWrapper/EnvironmentProvider.cs
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/NetSdkManagedInstaller.cs
Outdated
Show resolved
Hide resolved
not done. But I should really finish my PR |
Addressed feedback I've received so far, waiting on workload teams to start generating manifest packages to test with. |
do you mind to do a rebase in the meantime? It is easier to see the change. Thanks! |
e32a73a
to
0412aaa
Compare
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.
So far I've just looked at the implementation, but not the test updates.
src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/IWorkloadManifestUpdater.cs
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/NetSdkManagedInstaller.cs
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/NetSdkManagedInstaller.cs
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/NetSdkManagedInstaller.cs
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/NetSdkManagedInstaller.cs
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs
Outdated
Show resolved
Hide resolved
src/Cli/dotnet/commands/dotnet-workload/install/WorkloadManifestUpdater.cs
Outdated
Show resolved
Hide resolved
src/Tests/dotnet-workload-install.Tests/GivenNetSdkManagedWorkloadInstall.cs
Outdated
Show resolved
Hide resolved
0412aaa
to
c5440f5
Compare
@wli3 @dsplaisted I think I'm caught up to feedback now. I'm going to start testing end to end with the new manifest packages but in the meantime feel free to add more feedback. |
I've finished testing locally and I believe everything is good to go. A couple of notes:
|
@jonathanpeppers how soon will properly named and versioned manifest packages be ready? Is it worth waiting on them to merge this PR or should we proceed with the testing I've done locally? @dsplaisted let me know if you want me to port this to preview 4, for now I'm going to try to merge to main before there are any more conflicts. |
@sfoslund I started on the Android side: dotnet/android#5898 It will probably be next week some time before we have the 4 Apple workloads renamed, and these changes will be in Preview 5. Assuming this PR wouldn't break anything, you don't have to wait on us for this. |
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.
@sfoslund This is already merged but I went back and took another look at it since I hadn't had a chance to do so before. There's a few (non-critical) things I think would be nice to follow up on and fix.
}, | ||
rollback: () => { | ||
try | ||
{ | ||
_reporter.WriteLine(LocalizableStrings.RollingBackInstall); | ||
|
||
foreach (var manifest in manifestsToUpdate) |
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.
Nit: this indentation seems messed up.
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.
I'm not sure why github is displaying it like that, it seems fine in main: https://github.com/dotnet/sdk/blob/main/src/Cli/dotnet/commands/dotnet-workload/install/WorkloadInstallCommand.cs#L237
|
||
public async Task UpdateAdvertisingManifestsAsync(SdkFeatureBand featureBand, bool includePreviews) | ||
{ | ||
var manifests = GetInstalledManifestIds(); |
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.
I still think there's a mismatch here. The IWorkloadManifestProvider
is passed into the constructor, and is tied to a specific feature band. But there are instance methods on this class that also take a feature band. I think things won't work if there's a mismatch - you'll need to create a new workload manifest provider for the new feature band and then create a new workload manifest updater.
So I think we should remove the arguments from the methods in this class that take a feature band, and instead either take the feature band in the constructor, or better yet update the workload manifest provider so that it can return the feature band and we get the information from that.
} | ||
catch (Exception e) | ||
{ | ||
_reporter.WriteLine(string.Format(LocalizableStrings.FailedAdManifestUpdate, manifestId, e.Message)); |
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.
It sounds like the failure we would expect is if there are no manifest packages available on the NuGet feed. I think we should check for that explicitly and treat it not as an error (ie when we call DownloadPackageAsync). I think other failures are probably not expected and we may want to fail.
@@ -101,6 +96,53 @@ public void GivenWorkloadInstallOnFailingRollbackItDisplaysTopLevelError() | |||
exceptionThrown.Message.Should().Be("Failing workload: xamarin-android-build"); | |||
string.Join(" ", _reporter.Lines).Should().Contain("Rollback failure"); | |||
|
|||
} | |||
|
|||
[Fact] |
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.
Nit: Indentation
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.
Same here:
[Fact] |
No description provided.