[release/1.6] Fix usage of "unknown" platform#10268
Conversation
"unknown" should not be returned as a valid platform supported by the image Signed-off-by: Akhil Mohan <[email protected]>
|
Hi @k8s-infra-cherrypick-robot. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
| var platformSpecs []ocispec.Platform | ||
| return platformSpecs, Walk(ctx, Handlers(HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { | ||
| if desc.Platform != nil { | ||
| if desc.Platform.OS == "unknown" || desc.Platform.Architecture == "unknown" { |
There was a problem hiding this comment.
Wondering if we should also update the function description to mention that such platforms are omitted; I just noticed that it's not called out, so a caller may expect the list to include any platform (including the unknown/unknown ones);
// Platforms returns one or more platforms supported by the image.
func Platforms(ctx context.Context, provider content.Provider, image ocispec.Descriptor) ([]ocispec.Platform, error) {There was a problem hiding this comment.
Since unknown/unknown is not really a platform supported by image, I think the current comment should be good.
I can create a separate PR to give a more detailed description in the comment, as this is opened from the cherry-pick bot.
This is an automated cherry-pick of #10257
/assign akhilerm