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

buildah/push/manifest-push: add support for --force-compression to prevent reusing other blobs #4973

Merged
merged 2 commits into from
Aug 15, 2023

Conversation

flouthoc
Copy link
Collaborator

Adds support for --force-compression which allows end-users to force
push blobs with the selected compresison in --compression option, in
order to make sure that blobs of other compression on registry are not
reused.

Is equivalent to: force-compression here: https://docs.docker.com/build/exporters/#compression
Closes: #4613

Also Implements:
--compression-format and --compression-level for manifest push just like
podman's manifest push

buildah/push/manifest-push: add support for `--force-compression` to prevent reusing other blobs

@flouthoc flouthoc marked this pull request as draft August 11, 2023 18:22
@flouthoc
Copy link
Collaborator Author

@mtrmac FYI, although I still need to update docs but other than that most of the code and tests are done.

cmd/buildah/manifest.go Outdated Show resolved Hide resolved
@flouthoc flouthoc force-pushed the force-compression branch 2 times, most recently from ab3d461 to 4aec38a Compare August 14, 2023 06:56
@flouthoc flouthoc marked this pull request as ready for review August 14, 2023 06:56
@flouthoc flouthoc requested a review from mtrmac August 14, 2023 06:56
@flouthoc
Copy link
Collaborator Author

@mtrmac @giuseppe @containers/buildah-maintainers PTAL

Copy link
Contributor

@mtrmac mtrmac 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
Copy link
Contributor

openshift-ci bot commented Aug 14, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc, mtrmac

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

@@ -52,6 +62,10 @@ value can be entered. The password is entered without echo.

After copying the image, write the digest of the resulting image to the file.

**--force-compression**

Use the specified compression algorithm if the destination contains a differently-compressed variant already.
Copy link
Member

Choose a reason for hiding this comment

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

I think?

Suggested change
Use the specified compression algorithm if the destination contains a differently-compressed variant already.
Use the specified compression algorithm even if the destination contains a differently-compressed variant already.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed docs.

@@ -70,6 +70,10 @@ Layer(s) to encrypt: 0-indexed layer indices with support for negative indexing

The [protocol:keyfile] specifies the encryption protocol, which can be JWE (RFC7516), PGP (RFC4880), and PKCS7 (RFC2315) and the key material required for image encryption. For instance, jwe:/path/to/key.pem or pgp:[email protected] or pkcs7:/path/to/x509-file.

**--force-compression**

Use the specified compression algorithm if the destination contains a differently-compressed variant already.
Copy link
Member

Choose a reason for hiding this comment

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

ditto prior

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed docs.

@rhatdan
Copy link
Member

rhatdan commented Aug 14, 2023

/lgtm
Merging and you can fix the docs with a ci:docs PR.

Adds support for `--force-compression` which allows end-users to force
push blobs with the selected compresison in `--compression` option, in
order to make sure that `blobs` of other compression on registry are not
reused.

Is equivalent to: `force-compression` here: https://docs.docker.com/build/exporters/#compression
Closes: containers#4613

Also Implements:
`--compression-format` and `--compression-level` for `manifest push` just like
`podman`'s `manifest push`

Signed-off-by: Aditya R <[email protected]>
@openshift-ci openshift-ci bot removed the lgtm label Aug 15, 2023
@flouthoc
Copy link
Collaborator Author

@rhatdan I think this will need /lgtm again, I rebased and fixed documentation.

@TomSweeneyRedHat
Copy link
Member

LGTM
overlay test timed out, I've restarted

@TomSweeneyRedHat
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Aug 15, 2023
@openshift-merge-robot openshift-merge-robot merged commit 795c155 into containers:main Aug 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Buildah reuse gzip layers when "--compression-format zstd" assigned
5 participants