Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BuildKit and BuildAh image digest extraction #1026

Conversation

SaschaSchwarze0
Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 commented Mar 25, 2022

Changes

There was a change recently in BuildKit: its exported metadata file was changed to be formatted. Previously it was a single line JSON. Now, it is a formatted JSON. That required a change to the logic to extract the digest.

I am also changing the e2e test to verify that a successful BuildRun contains a valid image digest. This would have captured this problem earlier.

And that revealed that the digest we stored for BuildAh has always been incorrect. I basically observe the same as here: Digests on local buildah different from registry, unclear how to 'correct' #3866. I am putting in some workaround.

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

Release Notes

The BuildKit and BuildAh sample build strategies were fixed to correctly set the `shp-result-image-digest` system result.

@SaschaSchwarze0 SaschaSchwarze0 added the kind/bug Categorizes issue or PR as related to a bug. label Mar 25, 2022
@SaschaSchwarze0 SaschaSchwarze0 added this to the release-v0.9.0 milestone Mar 25, 2022
@openshift-ci openshift-ci bot added the release-note Label for when a PR has specified a release note label Mar 25, 2022
@SaschaSchwarze0 SaschaSchwarze0 force-pushed the sascha-fix-buildkit-image-digest branch 2 times, most recently from 1f25f6d to f582d08 Compare March 26, 2022 15:58
@SaschaSchwarze0 SaschaSchwarze0 force-pushed the sascha-fix-buildkit-image-digest branch 2 times, most recently from 23a1aa4 to 5d2a68f Compare March 27, 2022 19:46
@SaschaSchwarze0 SaschaSchwarze0 changed the title Fix BuildKit image digest extraction Fix BuildKit and BuildAh image digest extraction Mar 27, 2022
@SaschaSchwarze0 SaschaSchwarze0 force-pushed the sascha-fix-buildkit-image-digest branch from 5d2a68f to 3e5b6d7 Compare March 28, 2022 08:00
@gabemontero
Copy link
Member

/approve

I've also pinged a buildah team member about the item @SaschaSchwarze0 noted ... awaiting feedback

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 28, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gabemontero

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

The pull request process is described here

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 28, 2022
Copy link
Contributor

@qu1queee qu1queee left a comment

Choose a reason for hiding this comment

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

Nice. I left a comment on Buildah, I cannot properly judge if the proposed changes on the strategy are the right thing to do, asking to move this into an Issue. We can work on this offline if needed. The rest of the PR can go in as it enhance e2e.

test/e2e/e2e_test.go Show resolved Hide resolved
@qu1queee qu1queee self-requested a review March 29, 2022 09:21
Copy link
Contributor

@qu1queee qu1queee left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 29, 2022
@openshift-merge-robot openshift-merge-robot merged commit 6317205 into shipwright-io:main Mar 29, 2022
@SaschaSchwarze0 SaschaSchwarze0 deleted the sascha-fix-buildkit-image-digest branch March 29, 2022 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Label for when a PR has specified a release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants