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

Workload Install Type Can be Incorrect with Manifests Authored for Younger SDKs #39275

Closed
nagilson opened this issue Mar 6, 2024 · 7 comments · Fixed by #42566
Closed

Workload Install Type Can be Incorrect with Manifests Authored for Younger SDKs #39275

nagilson opened this issue Mar 6, 2024 · 7 comments · Fixed by #42566
Assignees

Comments

@nagilson
Copy link
Member

nagilson commented Mar 6, 2024

Describe the bug

Running dotnet workload --info can sometimes report the incorrect install type. For example, it may say that MSI based workloads are FileBased even though the SDK is running under MSI mode and those workloads are installed via MSIs.

image

To Reproduce

You need to have an SDK with a version that owns the manifests but is different from the Manifest Version.

What happens is that the SDK looks for an MSI sentinel file under metadata in program files using the Manifest Version, such as 8.0.100. But if the SDK version is different, such as 8.0.200, the MSI sentinel file will be in a folder called 8.0.200, not a folder with the manifest version 8.0.100.

The result of the lookup will be whatever 8.0.100 is, whether or not the SDK that owns the manifests (8.0.200) is file based, or MSI based. In this example, because the 8.0.100 folder in metadata does not exist, it will report the MSI workloads installed by the MSI SDK (8.0.200) to be file based, which is incorrect. However, if 8.0.200 is file based but uses 8.0.100 version manifests, and there is an SDK that's 8.0.100 and MSI based on the system, I'd imagine this bug would work in the opposite direction too.

Proposal

Perhaps we should have an msi file for each workload, or update this logic some other way.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Workloads untriaged Request triage from a team member labels Mar 6, 2024
@nagilson nagilson changed the title Workload Install Type Workload Install Type Can be Incorrect with Old Manifests Mar 6, 2024
@nagilson nagilson changed the title Workload Install Type Can be Incorrect with Old Manifests Workload Install Type Can be Incorrect with Manifests Authored for Younger SDKs Mar 6, 2024
@dsplaisted
Copy link
Member

dsplaisted commented Mar 28, 2024

We are using the workload manifest feature band where we should be using the feature band of the current SDK. Here is the line where this is happening:

reporter.WriteLine($" {WorkloadInstallType.GetWorkloadInstallType(new SdkFeatureBand(workloadFeatureBand), dotnetPath).ToString(),align}"

We should change that to this:

reporter.WriteLine($"       {WorkloadInstallType.GetWorkloadInstallType(new SdkFeatureBand(Utils.Product.Version), dotnetPath).ToString(),align}"

@vdanche
Copy link
Member

vdanche commented Aug 23, 2024

@Forgind This issue will not have a fix in net8.0, right? still repro on 8.0.402 sdk
image

FYI @marcpopMSFT

@Forgind
Copy link
Member

Forgind commented Aug 23, 2024

The PR to fix this was merged into main last week, not release/8.0.4xx, so it won't be fixed until 9.0

@vdanche
Copy link
Member

vdanche commented Sep 4, 2024

@Forgind checked with 9.0.100-rc.2.24453.20 exe install,
The install type for maui is displayed correctly, but install type for aspire is dislayed "FileBased", is it expected?
image

@Forgind
Copy link
Member

Forgind commented Sep 4, 2024

/cc: @dsplaisted to take a look

@dsplaisted
Copy link
Member

It looks like this was merged to main after we had branched for 10.0. I've opened a PR to backport it to 9.0: #43231

@vdanche
Copy link
Member

vdanche commented Sep 19, 2024

Checked with 9.0.100-rc.2.24468.2 SDK exe install, install type for aspire is dislayed as "Msi" now
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants