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

Search version in set #43096

Merged
merged 10 commits into from
Sep 12, 2024
Merged

Conversation

Forgind
Copy link
Member

@Forgind Forgind commented Aug 29, 2024

Progress on #42367

Current version:

C:\Users\User>dotnet workload search version 9.0.100-preview.6.24328.3
Workload manifest ID                               Manifest feature band      Manifest Version
-----------------------------------------------------------------------------------------------------
microsoft.net.workload.emscripten.current          9.0.100-preview.6          9.0.0-preview.6.24327.1
microsoft.net.workload.emscripten.net6             9.0.100-preview.6          9.0.0-preview.6.24327.1
microsoft.net.workload.emscripten.net7             9.0.100-preview.6          9.0.0-preview.6.24327.1
microsoft.net.workload.emscripten.net8             9.0.100-preview.6          9.0.0-preview.6.24327.1
microsoft.net.sdk.android                          9.0.100-preview.6          34.99.0-preview.6.340
microsoft.net.sdk.ios                              9.0.100-preview.6          17.2.9713-net9-p6
microsoft.net.sdk.maccatalyst                      9.0.100-preview.6          17.2.9713-net9-p6
microsoft.net.sdk.macos                            9.0.100-preview.6          14.2.9713-net9-p6
microsoft.net.sdk.maui                             9.0.100-preview.6          9.0.0-preview.6.24327.7
microsoft.net.sdk.tvos                             9.0.100-preview.6          17.2.9713-net9-p6
microsoft.net.workload.mono.toolchain.current      9.0.100-preview.6          9.0.0-preview.6.24327.7
microsoft.net.workload.mono.toolchain.net6         9.0.100-preview.6          9.0.0-preview.6.24327.7
microsoft.net.workload.mono.toolchain.net7         9.0.100-preview.6          9.0.0-preview.6.24327.7
microsoft.net.workload.mono.toolchain.net8         9.0.100-preview.6          9.0.0-preview.6.24327.7
microsoft.net.sdk.aspire                           8.0.100                    8.0.2

C:\Users\User>dotnet workload search version 9.0.100-preview.6.24328.3 --format json
{
  "manifestVersions": {
    "microsoft.net.workload.emscripten.current": "9.0.0-preview.6.24327.1/9.0.100-preview.6",
    "microsoft.net.workload.emscripten.net6": "9.0.0-preview.6.24327.1/9.0.100-preview.6",
    "microsoft.net.workload.emscripten.net7": "9.0.0-preview.6.24327.1/9.0.100-preview.6",
    "microsoft.net.workload.emscripten.net8": "9.0.0-preview.6.24327.1/9.0.100-preview.6",
    "microsoft.net.sdk.android": "34.99.0-preview.6.340/9.0.100-preview.6",
    "microsoft.net.sdk.ios": "17.2.9713-net9-p6/9.0.100-preview.6",
    "microsoft.net.sdk.maccatalyst": "17.2.9713-net9-p6/9.0.100-preview.6",
    "microsoft.net.sdk.macos": "14.2.9713-net9-p6/9.0.100-preview.6",
    "microsoft.net.sdk.maui": "9.0.0-preview.6.24327.7/9.0.100-preview.6",
    "microsoft.net.sdk.tvos": "17.2.9713-net9-p6/9.0.100-preview.6",
    "microsoft.net.workload.mono.toolchain.current": "9.0.0-preview.6.24327.7/9.0.100-preview.6",
    "microsoft.net.workload.mono.toolchain.net6": "9.0.0-preview.6.24327.7/9.0.100-preview.6",
    "microsoft.net.workload.mono.toolchain.net7": "9.0.0-preview.6.24327.7/9.0.100-preview.6",
    "microsoft.net.workload.mono.toolchain.net8": "9.0.0-preview.6.24327.7/9.0.100-preview.6",
    "microsoft.net.sdk.aspire": "8.0.2/8.0.100"
  }
}

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Aug 29, 2024
Copy link
Member

@dsplaisted dsplaisted left a comment

Choose a reason for hiding this comment

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

So we've already added dotnet workload search version which lists the available workload set versions, right? It looks like this adds dotnet workload search version <workloadSetVersion>, and when the workload set version is specified it displays the manifests versions in that workload set.

I'm not sure about the scenario here. We do want to make more information available about what is in a workload set, but I think the manifest versions aren't too generally helpful here. Adding this now with this output format will make it harder to add more useful information (such as release notes, versions of tools such as XCode required, etc) to this command later.

<value>SEARCH_STRING</value>
</data>
<data name="WorkloadVersionArgumentDescription" xml:space="preserve">
<value>Output workload versions associated with the provided workload version.</value>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<value>Output workload versions associated with the provided workload version.</value>
<value>Output workload manifest versions associated with the provided workload version.</value>

if (_workloadSetOutputFormat?.Equals("json", StringComparison.OrdinalIgnoreCase) == true)
{
Reporter.WriteLine(JsonSerializer.Serialize(
workloadSet.ManifestVersions.ToDictionary(kvp => kvp.Key.ToString(), kvp => $"{kvp.Value.Version}/{kvp.Value.FeatureBand}")));
Copy link
Member

Choose a reason for hiding this comment

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

I think this is (and should be) the same format as the rollback file. So use WorkloadSet.ToJson here instead of duplicating the logic of how it's formatted.

@marcpopMSFT
Copy link
Member

Triage: Summary is that the json format should have slightly more formatting so if we change this to add more data in the future, that is not a breaking change (ie put the manifest info in a subnode).

- Generate error if workload search term and version subcommand are specified
- If no workload sets are found, do not treat as an error, but print message to StdErr
- Fix issue handling preview workload set versions when searching
Also split feature band out into separate column
@dsplaisted dsplaisted requested a review from a team September 12, 2024 14:04
@dsplaisted
Copy link
Member

I've made some updates to this and would appreciate a quick review.

I added column headers to the table output and split the manifest feature band into a separate column. I've updated the PR description to show this. @baronfel, does this look good?

@baronfel
Copy link
Member

Lovely! Thank you for updating the description. Totally agree with making the table output more user-friendly - with the json as the escape hatch we can freely change the user-facing views.

Copy link
Member

@baronfel baronfel left a comment

Choose a reason for hiding this comment

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

The new VM tests look very helpful 👍

@dsplaisted dsplaisted merged commit d84e27b into dotnet:release/9.0.1xx Sep 12, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants