feat: support oci tarballs of oci_images#852
feat: support oci tarballs of oci_images#852peakschris wants to merge 2 commits intobazel-contrib:mainfrom
Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR.
| if [[ "${FORMAT}" == "oci" ]]; then | ||
| # Handle multi-architecture image indexes. | ||
| # Ideally the toolchains we rely on would output these for us, but they don't seem to. | ||
| if [[ "${MEDIA_TYPE}" != "application/vnd.oci.image.manifest.v1+json" ]]; then | ||
| # Handle oci_image_index multi-architecture image indexes. | ||
| # Ideally the toolchains we rely on would output these for us, but they don't seem to. |
There was a problem hiding this comment.
Multi-arch indexes routed through single-image branch
The new OCI branch decides whether to treat the input as an index or a single image by checking MEDIA_TYPE against application/vnd.oci.image.manifest.v1+json. MEDIA_TYPE is derived from .manifests[0].mediaType, which is also application/vnd.oci.image.manifest.v1+json for multi-architecture oci_image_index outputs. After this change such indexes now execute the single-image path, so only the first manifest’s config and layers are added and the index.json is not rewritten for additional architectures. Multi-arch tarballs will therefore be missing secondary platforms. The branch should detect indexes via the number of manifests or the top-level media type instead of a string comparison to the first manifest’s type.
Useful? React with 👍 / 👎.

Support generation of 'oci' format tarballs of oci_image targets