sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Workload install that fails doesn't roll back the manifest updates

Open marcpopMSFT opened this issue 1 year ago • 1 comments

I ran into this when testing the automatic upgrade path for workloads. The issue is that maui depends on the N and N-1 runtime workloads so when I installed maui, then added a new feed with unreleased N runtime bits, and then tried to install, it updated the manifests first based on the new feed which brought in the N versions of the runtime manifests (which also includes the -net7 and -net6 manifests). This then tried to update my packs but the maui runtime dependencies for downlevel failed.

I was left in a state where my CLI thought that wasm-tools and ios workloads were installed (per dotnet workload list) and it listed the latest version. However, the packs for that latest version weren't installed because they got rolled back by the failed install.

C:\Users\WDAGUtilityAccount\test>dotnet workload install wasm-tools

Workload(s) 'wasm-tools' are already installed.
....
Downloading Microsoft.NETCore.App.Runtime.Mono.ios-arm.Msi.x64 (7.0.16)
Workload installation failed. Rolling back installed **packs**...
Workload installation failed: One or more errors occurred. (microsoft.netcore.app.runtime.mono.ios-arm.msi.x64::7.0.16 is not found in NuGet feeds <feed>".)
  • Install wasm-tools with nuget.org
    • wasm-tools is working with version 8.0.1
  • install ios with nuget.org
  • add .net 8 early access feed
  • install wasm-tools
    • It updates all the manifests first
    • Because maui doesn't have separate 8 and 7 workloads, it depends on a 7 version of the runtime packs and the install fails because I didn't add the 7.0 internal feed
    • Workload installation failed. Rolling back installed packs...
    • It did NOT roll back the manifest update
  • wasm tools is now busted
  • uninstall ios
  • install wasm-tools (which now installs the 8.0.2 versions from that feed)
  • wasm tools is working again

marcpopMSFT avatar Feb 08 '24 21:02 marcpopMSFT

We should see if this also needs to be changed for workload update rollback

nagilson avatar Mar 06 '24 22:03 nagilson