-
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
fix bug podman sign storage path #7081
fix bug podman sign storage path #7081
Conversation
@@ -608,15 +606,6 @@ func (ir *ImageEngine) Sign(ctx context.Context, names []string, options entitie | |||
return nil, errors.Errorf("cannot determine canonical Docker reference for destination %s", transports.ImageName(rawSource.Reference())) | |||
} | |||
|
|||
// create the signstore file |
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.
Do we not need to create the signstore file?
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.
Move the comments down to L635 where the sigstore is created. Deleted lines of code are not used since the repo and digest can be got from image reference.
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.
Can we add tests?
LGTM |
bd2f4d3
to
b2f7414
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.
(I’d personally somewhat prefer separate PRs for conceptually separate fixes; OTOH there is some overlap, and separate PRs would require reviews+merging in order, requiring some extra time.)
1bf1550
to
0f49de3
Compare
test/e2e/image_sign_test.go
Outdated
session := podmanTest.Podman([]string{"image", "sign", "--directory", sigDir, "--sign-by", "[email protected]", "docker://library/alpine"}) | ||
session.WaitWithDefaultTimeout() | ||
Expect(session.ExitCode()).To(Equal(0)) | ||
sigDigestDir := "alpine@sha256=185518070891758909c9f839cf4ca393ee977ac378609f700f60a771a2dfe321" |
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.
Does this work long-term? Looking at CACHE_IMAGES
, alpine:latest
is pulled from an external registry, so the digest might change over time.
0f49de3
to
27d9a55
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.
Code LGTM; the hard-coded digest in the test seems wrong to me but I haven’t looked into it much.
27d9a55
to
e55cd88
Compare
- fix the bud podman not using specified --directory as signature storage. - use manifest and image referce to set repo@digest. close containers#6994 close containers#6993 Signed-off-by: Qi Wang <[email protected]>
e55cd88
to
69ac054
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: QiWang19, 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 |
close (podman image sign) uses an unpredictable image name for the destination file #6994
close (podman image sign) fails with “Use a supported scheme” if the directory is explicitly specified or the default #6993
Signed-off-by: Qi Wang [email protected]