Skip to content

build: check that digest bundle images can be pinned - #1749

Draft
oskutka wants to merge 1 commit into
devfile:mainfrom
oskutka:check-pinnable-images
Draft

oskutka wants to merge 1 commit into
devfile:mainfrom
oskutka:check-pinnable-images

Conversation

@oskutka

@oskutka oskutka commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

build/scripts/build_digests_bundle.sh, which make-release.sh --release runs to turn the
tag-based bundle into the digest bundle, now validates the result before the bundle is pushed.

Every RELATED_IMAGE_* value in the rendered CSV — regular and init containers — must be a digest
reference accepted by the PinnedImageSet API and must pass podman manifest inspect in an empty
store. A single OCI image manifest is well formed and pullable, yet that command fails on it and an
administrator's pinned image set is silently disabled, because the prefetch is all-or-nothing per
node.

The same change:

  • fails when a digest cannot be resolved, instead of writing image@ into the bundle;
  • strips tags with a last-colon rule (strip_tag), so a registry port or an already-digested
    reference is not mangled;
  • rejects empty and multi-line RELATED_IMAGE_* values.

What issues does this PR fix or reference?

CRW-14102. Context: eclipse-che/che#23975 (moving :next editor definitions shipped in 7.124.0)
and eclipse-che/che#24027 (root cause of the moving UDI reference that died after 7.123.0/7.124.0).
Similar check for eclipse-che/che-operator: eclipse-che/che-operator#2280
Documentation PR in eclipse-che/che-docs: eclipse-che/che-docs#3215.

Is it tested? How?

  • bash -n passes; shellcheck reports only the pre-existing SC2317 notes that are also present
    on main.
  • The helpers were exercised against real images: an index digest passes, its OCI sub-manifest
    fails with the expected "Treating single images as manifest lists is not implemented", an empty
    value is rejected, and strip_tag handles quay.io:443/…, image:tag and image@sha256:….
  • A full run needs the release toolchain (bundle image, opm), so the end-to-end path is not
    exercised here; the digest bundle output is unchanged for references without a registry port.

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

🤖 Generated with Claude Code

@openshift-ci

openshift-ci Bot commented Nov 25, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: oskutka
Once this PR has been reviewed and has the lgtm label, please assign dkwon17 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@openshift-ci

openshift-ci Bot commented Nov 25, 2026

Copy link
Copy Markdown

Hi @oskutka. Thanks for your PR.

I'm waiting for a devfile member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

The digest bundle is what ships in the release-digest catalog, and its
RELATED_IMAGE_* values reach administrators' PinnedImageSets, but nothing
verified they could be pre-pulled. A single OCI image manifest is well
formed and pullable yet `podman manifest inspect` rejects it, and the
prefetch is all-or-nothing per node.

After rewriting tags to digests, fail the release when a RELATED_IMAGE_*
value is not a digest reference accepted by the API or fails
`podman manifest inspect` in an empty store. Also fail when a digest cannot
be resolved instead of writing an empty reference, and strip tags with the
last-colon rule so a registry port or an existing digest is not mangled.

Assisted-by: Claude Code
Co-Authored-By: Claude Code <noreply@anthropic.com>
Signed-off-by: Ondrej Skutka <oskutka@redhat.com>
@oskutka
oskutka force-pushed the check-pinnable-images branch from 8cbbbf9 to de00e55 Compare November 25, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant