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

podman, push: expose --compression-format #12450

Merged
merged 1 commit into from
Dec 1, 2021

Conversation

giuseppe
Copy link
Member

support overriding the compression format at push time.

Signed-off-by: Giuseppe Scrivano [email protected]

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 30, 2021
@@ -108,6 +108,8 @@ func pushFlags(cmd *cobra.Command) {

flags.BoolVar(&pushOptions.TLSVerifyCLI, "tls-verify", true, "Require HTTPS and verify certificates when contacting registries")

flags.StringVar(&pushOptions.CompressionFormat, "compression-format", "", "compression format to use")
Copy link
Member

Choose a reason for hiding this comment

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

Nit, remove line between this and previous line.

Copy link
Member

Choose a reason for hiding this comment

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

Should we set default, should it be added to containers.conf?

Copy link
Member Author

Choose a reason for hiding this comment

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

the default is gzip

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, I think this should be configurable from containers.conf

Copy link
Member Author

Choose a reason for hiding this comment

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

I've opened a PR here: containers/common#845

@@ -71,6 +71,10 @@ Please refer to containers-certs.d(5) for details. (This option is not available
Compress tarball image layers when pushing to a directory using the 'dir' transport. (default is same compression type, compressed or uncompressed, as source)
Note: This flag can only be set when using the **dir** transport

#### **--compression-format** *COMPRESSION*

Specifies the compression format to use. Supported values are: `gzip`, `zstd` and `zstd:chunked`.
Copy link
Member

Choose a reason for hiding this comment

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

What is the default?

test/e2e/push_test.go Outdated Show resolved Hide resolved
support overriding the compression format at push time.

Signed-off-by: Giuseppe Scrivano <[email protected]>
@flouthoc
Copy link
Collaborator

flouthoc commented Dec 1, 2021

LGTM restarted flakes. Just a discussion point should this also include no-compression or none which could be gzip with no-compression some relevant discussion here moby/moby#1266

@giuseppe
Copy link
Member Author

giuseppe commented Dec 1, 2021

do we need to add --compression-level?

@flouthoc
Copy link
Collaborator

flouthoc commented Dec 1, 2021

do we need to add --compression-level?

I think yes compression-level=<n> which could be 1 to 9 for gzip would be really nice. I guess scale would be relative to compression algorithm though like zstd supports upto 22 i guess.

@vrothberg
Copy link
Member

do we need to add --compression-level?

I would leave that to skopeo which already supports that. I cannot imagine a Podman user to know which level to even chose.

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

@flouthoc
Copy link
Collaborator

flouthoc commented Dec 1, 2021

do we need to add --compression-level?

I would leave that to skopeo which already supports that. I cannot imagine a Podman user to know which level to even chose.

@vrothberg Fair point.

@rhatdan
Copy link
Member

rhatdan commented Dec 1, 2021

/approve
/lgtm
@giuseppe could you open a PR to change the defaults based on containers.conf entry. Hopefully at some point zstd will become the default.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 1, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 1, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, rhatdan

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-merge-robot openshift-merge-robot merged commit 5d91edc into containers:main Dec 1, 2021
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants