-
Notifications
You must be signed in to change notification settings - Fork 252
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
Bug 1841178: fix(images): use docker/podman create and cp for exec unpacking #351
Bug 1841178: fix(images): use docker/podman create and cp for exec unpacking #351
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: njhale 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 |
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.
Just one small comment, otherwise this looks great. Nice job!
cmd/opm/alpha/bundle/validate.go
Outdated
err error | ||
) | ||
|
||
tool := containertools.NewContainerTool(imageBuilderArgs, containertools.NoneTool) |
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.
Right now the help text for this flag lists docker and podman and is a "build" tool. Can we update the help text to at least mention the none
option? I think if we did that we should also probably attempt to rename the parameter, since we aren't building anything in bundle validate.
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.
👍
@@ -101,6 +102,49 @@ func (r *ContainerCommandRunner) Save(image, tarFile string) error { | |||
return nil | |||
} | |||
|
|||
// Unpack copies a directory from a local container image to a directory in the local filesystem. | |||
func (r *ContainerCommandRunner) Unpack(image, src, dst string) error { | |||
args := []string{"create", image, ""} |
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.
👍
@@ -101,6 +102,49 @@ func (r *ContainerCommandRunner) Save(image, tarFile string) error { | |||
return nil | |||
} | |||
|
|||
// Unpack copies a directory from a local container image to a directory in the local filesystem. | |||
func (r *ContainerCommandRunner) Unpack(image, src, dst string) error { |
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.
Shouldn't this replace Save
entirely? I don't think we want to use save at all, unless I am missing a case where we want it.
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.
Good point; it should. I'll drop Save
in favor of Unpack
.
Use docker/podman create and cp commands to unpack bundle and index images instead of a custom unpacking scheme. This fixes an issue where whiteout files present in an image cause `opm alpha bundle validate` to fail.
/lgtm |
/hold cancel |
/refresh |
@njhale: All pull requests linked via external trackers have merged: . Bugzilla bug 1841178 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/cherry-pick release-4.5 |
@njhale: new pull request created: #352 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Use docker/podman create and cp commands to unpack bundle and index
images instead of a custom unpacking scheme. This fixes an issue where
whiteout files present in an image cause
opm alpha bundle validate
tofail.