Skip to content

Conversation

@jsing-canva
Copy link

Add a tag_platform_images attribute to oci_push, which if enabled, results in each platform specific image being tagged with each remote tag and an additional '-${os}-${arch}' suffix. This makes it possible to reference platform specific images as ${tag}-${os}-${arch} (e.g. "v1.2.3-linux-arm64").

This makes it easier to use rules_oci and multi-image indexes, with systems that do not handle OCI image indexes (such as AWS Lambda) and instead require a reference to a platform specific image.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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, like "@codex address that feedback".

Comment on lines +74 to +77
MANIFEST_DIGEST=$("${JQ}" -r '.manifests[0].digest' "${IMAGE_DIR}/index.json")
MANIFEST_FILE="${IMAGE_DIR}/blobs/${MANIFEST_DIGEST%%:*}/${MANIFEST_DIGEST##*:}"
IMAGE_DIGESTS=$(${JQ} -r '.manifests[]? | [ .digest, .platform.os, .platform.architecture ] | @tsv ' "${MANIFEST_FILE}")

Choose a reason for hiding this comment

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

P1 Badge Platform tagging reads image manifest instead of index

To build the per-platform tag list, MANIFEST_DIGEST is taken from index.json and used to open that manifest’s blob, then .manifests[] is queried from that file. For a standard OCI layout this blob is a single image manifest and contains no manifests array, so IMAGE_DIGESTS is empty and --tag-platform-images never tags any platform images. The per-platform digest list should be derived from index.json itself rather than a child manifest.

Useful? React with 👍 / 👎.

@aspect-workflows
Copy link

aspect-workflows bot commented Dec 30, 2025

Test

2 test targets passed

Targets
//examples/push:test [k8-fastbuild]                                 2s
//examples/push:test_push_image_wo_repository_fails [k8-fastbuild]  299ms

Total test execution time was 2s. 47 tests (95.9%) were fully cached saving 25s.

Add a `tag_platform_images` attribute to `oci_push`, which if enabled,
results in each platform specific image being tagged with each remote
tag and an additional '-${os}-${arch}' suffix. This makes it possible
to reference platform specific images as `${tag}-${os}-${arch}`
(e.g. "v1.2.3-linux-arm64").

This makes it easier to use rules_oci and multi-image indexes, with
systems that do not handle OCI image indexes (such as AWS Lambda)
and instead require a reference to a platform specific image.
@jsing-canva jsing-canva force-pushed the arch-tagging-upstream branch from 2f4e544 to 679245a Compare December 30, 2025 04:14
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