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

Support manifest lists and use the publish RID to pick the most relevant manifest from the list #247

Merged
merged 25 commits into from
Jan 19, 2023

Conversation

baronfel
Copy link
Member

@baronfel baronfel commented Nov 11, 2022

The basic idea is:

  • prefer getting manifest lists from registries if they are available
  • if none is available, use the existing manifest code
  • if a list is available, cross-reference the items on that list with the publish RID to determine which image in the list should be the 'real' base image, the continue the rest of the process per normal.

This does not enable creating manifest lists for a project, just enables users to trust that the -r parameter to publish will do the right thing.

TODO:

  • Dedicated tests, positive and negative for the rid-probing mechanism
  • Parameterized end-to-end tests of the same
  • Error messages and codes for the new thrown exceptions

@baronfel baronfel force-pushed the support-other-arch-and-os branch from 13cb072 to 5209f49 Compare November 21, 2022 19:52
@baronfel baronfel added this to the 7.0.200/VS17.5 milestone Dec 7, 2022
@baronfel baronfel force-pushed the support-other-arch-and-os branch 2 times, most recently from de27e05 to a0f806c Compare December 20, 2022 21:44
@baronfel baronfel force-pushed the support-other-arch-and-os branch from a0f806c to 3510ea2 Compare December 20, 2022 21:49
@baronfel baronfel force-pushed the support-other-arch-and-os branch from fe22c0a to 82b4793 Compare December 21, 2022 18:55
@baronfel baronfel force-pushed the support-other-arch-and-os branch from 82b4793 to 08c09df Compare December 21, 2022 19:08
@baronfel baronfel force-pushed the support-other-arch-and-os branch from d1036ee to da69e11 Compare December 21, 2022 20:34
@baronfel
Copy link
Member Author

This is ready for review.

image

We read manifest lists, convert the available platform-specific manifests to equivalent RIDs and extract those slices of the RID graph, and then find the most-applicable base image for the RID the user specified for the build. If there is no match, we emit an error with the valid values. It works for linux-x64, linux-arm, and linux-amr64 on my local testing with a local Docker daemon.

The only thing I don't like is the hard-coded path for the RuntimeGraphFilePath in the tests - right now we pin to the 7.0.100 SDK but ideally we'd be able to get that from the runtime environment somehow.

@baronfel
Copy link
Member Author

@vijayrkn as a side effect of this change, the VS side of the integration that forces linux-x64 could be lifted. We'll have to talk about the exact mechanism though - perhaps package version is enough to feature-gate that logic?

rainersigwald and others added 2 commits January 19, 2023 11:14
We don't do anything too complicated so 'most recent'-ish should be fine.
This ensures that valid-but-meaninless in this context RIDs (like unix, any, base, etc.) are not take into consideration for compatibility
@baronfel baronfel enabled auto-merge January 19, 2023 23:09
@baronfel baronfel merged commit 6715978 into main Jan 19, 2023
@baronfel baronfel deleted the support-other-arch-and-os branch January 19, 2023 23:11
@clarkezone
Copy link

Is this available to test in a build?

@baronfel
Copy link
Member Author

baronfel commented Jan 24, 2023

Yes! Version 0.3.2 is available on NuGet right now, and the documentation in this repo has been updated to match it. We've also got release notes up here. Try it out and let us know what you think. I'll be working with our friends in the docs org to update our pages on learn.microsoft.com over this week.

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

Successfully merging this pull request may close these issues.

3 participants