Skip to content

fix: populate OCI platform metadata & do not ignore platform option for... - #657

Open
jasonpaulos wants to merge 2 commits into
anchore:mainfrom
jasonpaulos:oci-platform-metadata
Open

fix: populate OCI platform metadata & do not ignore platform option for...#657
jasonpaulos wants to merge 2 commits into
anchore:mainfrom
jasonpaulos:oci-platform-metadata

Conversation

@jasonpaulos

@jasonpaulos jasonpaulos commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

…single-platform images

This PR makes two improvements when reading OCI directory and tarball images:

  1. Populates the image metadata struct with the appropriate platform information. The only case when this is omitted is when no specific platform was requested and the OCI image contains only a single image.
  2. When an OCI image contains only a single image, the prior behavior would be to select this image regardless of the requested platform. Now, an error will be thrown if a platform was requested that does not match the single image. If the user does not request a specific platform, the single image will continue to be used regardless of its platform.

I view number 2 as a bugfix, since silently returning an image for a different platform than the one requested is not expected behavior. Additionally, a proper error is already returned if the desired platform isn't available on an OCI bundle that has more than 1 image in it.

…ngle-platform images

Signed-off-by: Jason Paulos <jasonpaulos@users.noreply.github.com>
@jasonpaulos
jasonpaulos force-pushed the oci-platform-metadata branch from 2ae33f8 to bfc8d18 Compare July 30, 2026 18:19
@jasonpaulos jasonpaulos changed the title Populate OCI platform metadata & do not ignore platform option for... fix: populate OCI platform metadata & do not ignore platform option for... Aug 7, 2026
Signed-off-by: Jason Paulos <jasonpaulos@users.noreply.github.com>
@jasonpaulos

Copy link
Copy Markdown
Contributor Author

@wagoodman I just added --retry-times=3 to the skopeo copy command, which should help with the integration test that just flaked.

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.

1 participant