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

Add workload fallback to previous feature band #19545

Merged
merged 3 commits into from
Aug 16, 2021

Conversation

sfoslund
Copy link
Member

@sfoslund sfoslund commented Aug 5, 2021

Fixes #18489

@sfoslund
Copy link
Member Author

sfoslund commented Aug 5, 2021

@dsplaisted the issue mentions that we want to add the ability to depreciate workloads when we fallback, do you have any thoughts on that implementation? I haven't included it here.

@dsplaisted
Copy link
Member

The fallback should be per manifest, instead of for the top-level manifest folder. IE there might be a 6.0.200 version of Microsoft.NET.Workload.Mono.ToolChain and Microsoft.NET.Workload.Emscripten, but not 6.0.200 versions of Microsoft.NET.Sdk.Android or Microsoft.NET.Sdk.iOS. In that case it should fall back to the 6.0.100 folder for iOS and Android, but not for the Mono toolchain or Emscripten workload manifests.

This also should be based on a list of known manifests that are included in the SDK. That's the way to deprecate workloads too, if we don't include them in the SDK, then it wouldn't fall back to previous folders for that workload manifest.

We probably want to generate the list of known workload manifests in the installer repo, and put that list in a data file in the SDK directory for the workload resolver logic to pick up.

@sfoslund
Copy link
Member Author

sfoslund commented Aug 6, 2021

@dsplaisted okay I've updated the implementation to fallback per manifest and when a serialized list of known manifests is located at dotnet/sdk/version/.knownWorkloadIds, can you take a look?

@sfoslund
Copy link
Member Author

sfoslund commented Aug 9, 2021

FYI @wli3 since I think you had some concerns about this feature, do you want to review too?

@wli3
Copy link

wli3 commented Aug 9, 2021

checking...

@@ -80,6 +97,7 @@ public IEnumerable<(string manifestId, string? informationalPath, Func<Stream> o

public IEnumerable<string> GetManifestDirectories()
Copy link

@wli3 wli3 Aug 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implementation side, we just need to make sure GetManifestDirectories and GetManifests are the only methods used to search for manifest. Or other callers might get the old behavior

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I think that's the intention regardless of this change.

@sfoslund sfoslund merged commit c7ccfae into dotnet:main Aug 16, 2021
@sfoslund sfoslund deleted the WorkloadPrevFallback branch August 16, 2021 19:59
radical added a commit to steveisok/runtime that referenced this pull request Jan 6, 2022
To resolve a workload, the current version band is used to look in
`sdk-manifests` directory. But when in development, and bumping to a
newer version band, not all the manifests might have packages for that.

This shows up when bumping the band to `6.0.200`, where we generate
the corresponding packages for wasm-tools. But the Emscripten packages
are still on `6.0.100`.

SDK [added](dotnet/sdk#19545) support for
falling back to older bands in that case.

The `InstallWorkloadFromArtifacts` task emits a warning about not being
able to find the emscripten manifest package. But this becomes an error
on CI due to warnaserror=true.

So, log a message instead of a warning. But this is only done for the
*dependent* manifest.
safern pushed a commit to dotnet/runtime that referenced this pull request Jan 7, 2022
* Bump SdkVersionForWorkloadTesting to use a 200 band SDK

#62787 bumped the manifest id.  This change bumps the prop for testing.

* Download dotnet-install script for installing workloads

Instead of trying to use the script from `.dotnet`, download the script.
`.dotnet` might not exist, for example, when the `global.json` version
matches the system installed one.

* Workloads: fix CI build when bumping to a newer version band

To resolve a workload, the current version band is used to look in
`sdk-manifests` directory. But when in development, and bumping to a
newer version band, not all the manifests might have packages for that.

This shows up when bumping the band to `6.0.200`, where we generate
the corresponding packages for wasm-tools. But the Emscripten packages
are still on `6.0.100`.

SDK [added](dotnet/sdk#19545) support for
falling back to older bands in that case.

The `InstallWorkloadFromArtifacts` task emits a warning about not being
able to find the emscripten manifest package. But this becomes an error
on CI due to warnaserror=true.

So, log a message instead of a warning. But this is only done for the
*dependent* manifest.

Co-authored-by: Steve Pfister <[email protected]>
Co-authored-by: Ankit Jain <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fall back to preview feature band when there is no current workload manifest matching the current SDK
3 participants