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 bug podman sign storage path #7081

Merged
merged 1 commit into from
Aug 5, 2020

Conversation

QiWang19
Copy link
Contributor

Signed-off-by: Qi Wang [email protected]

@@ -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
Copy link
Member

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?

Copy link
Contributor Author

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.

@rhatdan
Copy link
Member

rhatdan commented Jul 31, 2020

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.

Can we add tests?

@TomSweeneyRedHat
Copy link
Member

LGTM
and I concur with @vrothberg on an added test or two.

@QiWang19 QiWang19 force-pushed the sigature-store branch 4 times, most recently from bd2f4d3 to b2f7414 Compare July 31, 2020 21:56
Copy link
Collaborator

@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.

(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.)

pkg/domain/infra/abi/images.go Outdated Show resolved Hide resolved
pkg/domain/infra/abi/images.go Outdated Show resolved Hide resolved
pkg/domain/infra/abi/images.go Show resolved Hide resolved
pkg/domain/infra/abi/images.go Outdated Show resolved Hide resolved
pkg/domain/infra/abi/images.go Show resolved Hide resolved
test/e2e/image_sign_test.go Outdated Show resolved Hide resolved
test/e2e/image_sign_test.go Show resolved Hide resolved
test/e2e/image_sign_test.go Show resolved Hide resolved
pkg/domain/infra/abi/images.go Outdated Show resolved Hide resolved
@QiWang19 QiWang19 force-pushed the sigature-store branch 2 times, most recently from 1bf1550 to 0f49de3 Compare August 4, 2020 14:04
pkg/domain/infra/abi/images.go Outdated Show resolved Hide resolved
pkg/domain/infra/abi/images.go Outdated Show resolved Hide resolved
pkg/domain/infra/abi/images.go Outdated Show resolved Hide resolved
test/e2e/image_sign_test.go Outdated Show resolved Hide resolved
test/e2e/image_sign_test.go Outdated Show resolved Hide resolved
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"
Copy link
Collaborator

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.

Copy link
Collaborator

@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.

Code LGTM; the hard-coded digest in the test seems wrong to me but I haven’t looked into it much.

pkg/domain/infra/abi/images.go Outdated Show resolved Hide resolved
- 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]>
@rhatdan
Copy link
Member

rhatdan commented Aug 5, 2020

/approve
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 5, 2020
@openshift-ci-robot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 5, 2020
@openshift-merge-robot openshift-merge-robot merged commit 0a3f3c9 into containers:master Aug 5, 2020
@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 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 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
8 participants