-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cmd, push: expose --compression-level #18940
cmd, push: expose --compression-level #18940
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe, vrothberg 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 |
test/e2e/manifest_test.go
Outdated
@@ -435,7 +435,12 @@ var _ = Describe("Podman manifest", func() { | |||
Expect(output).To(ContainSubstring("Writing manifest to image destination")) | |||
Expect(output).To(ContainSubstring("Storing signatures")) | |||
|
|||
push = podmanTest.Podman([]string{"manifest", "push", "--tls-verify=false", "--creds=podmantest:wrongpasswd", "foo", "localhost:" + registry.Port + "/credstest"}) | |||
// Invalid compression format specified for gzip, it must fail | |||
push = podmanTest.Podman([]string{"push", "--compression-format=gzip", "--compression-level=20", "--tls-verify=false", "--creds=" + registry.User + ":" + registry.Password, "--format=v2s2", "localhost:" + registry.Port + "/alpine:latest"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is running push
not manifest push
exit code checks are bad, you must check for the proper error message on stderr.
test/e2e/push_test.go
Outdated
push = podmanTest.Podman([]string{"push", "--compression-format=gzip", "--compression-level=10", "--tls-verify=false", "--remove-signatures", ALPINE, "localhost:5000/my-alpine"}) | ||
push.WaitWithDefaultTimeout() | ||
Expect(push).Should(Exit(125)) | ||
Expect(push.ErrorToString()).To(BeEmpty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why should error be empty? please check for the actual expected error message.
5879342
to
e3685bc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs check is failing
9d68ccd
to
66ce890
Compare
test/e2e/manifest_test.go
Outdated
@@ -434,7 +434,14 @@ var _ = Describe("Podman manifest", func() { | |||
Expect(output).To(ContainSubstring("Writing manifest to image destination")) | |||
Expect(output).To(ContainSubstring("Storing signatures")) | |||
|
|||
push = podmanTest.Podman([]string{"manifest", "push", "--tls-verify=false", "--creds=podmantest:wrongpasswd", "foo", "localhost:" + registry.Port + "/credstest"}) | |||
// Invalid compression format specified for gzip, it must fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment accurate? It says format, but the error-message check (line 442) says level. Comment also says gzip
, which seems inconsistent with zstd
. Same applies to lines 102-103 in push_test.go below.
66ce890
to
5fff082
Compare
Should this be configurable in containers.conf? Stored with the compression type? |
####> are applicable to all of those. | ||
#### **--compression-level**=*level* | ||
|
||
Specifies the compression level to use. The value is specific to the compression algorithm used, e.g. for zstd the accepted values are in the range 1-20 (inclusive), while for gzip it is 1-9 (inclusive). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the defaults?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@giuseppe this one's still one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. I was waiting for the c/common change to merge before pushing the new version.
Should be addressed now
5fff082
to
92e4282
Compare
added compressionlevel to containers.conf here: containers/common#1518 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
####> are applicable to all of those. | ||
#### **--compression-level**=*level* | ||
|
||
Specifies the compression level to use. The value is specific to the compression algorithm used, e.g. for zstd the accepted values are in the range 1-20 (inclusive), while for gzip it is 1-9 (inclusive). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@giuseppe this one's still one
92e4282
to
d9ed414
Compare
d9ed414
to
c07883b
Compare
c07883b
to
10a54ed
Compare
Signed-off-by: Giuseppe Scrivano <[email protected]>
This patch adds the --compression-level option to the push command. Closes: containers#18939 Signed-off-by: Giuseppe Scrivano <[email protected]>
10a54ed
to
bb932cc
Compare
addressed all comment, and the CI is green |
/lgtm |
This patch adds the --compression-level option to the push command.
Closes: #18939
Does this PR introduce a user-facing change?