-
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
remote: checkpoint --export prints a rawInput or an error on remote #15812
remote: checkpoint --export prints a rawInput or an error on remote #15812
Conversation
Thanks @sstosh |
// options are options and allow for more fine grained control of the checkpoint process. | ||
func Checkpoint(ctx context.Context, nameOrID string, options *CheckpointOptions) (*entities.CheckpointReport, error) { | ||
func Checkpoint(ctx context.Context, cid string, options *CheckpointOptions) (*entities.CheckpointReport, 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.
The renaming of nameOrID
does not look correct to me. The value can be either a name or a (partial) ID, can't it?
I'd appreciate a test checking for the name.
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.
As far as I checked, containers.Checkpoint
function is only called by tunnel.(*ContainerEngine).ContainerCheckpoint
function.
This means that nameOrID
is always assigned a container ID.
podman/pkg/domain/infra/tunnel/containers.go
Line 412 in 750726e
report, err := containers.Checkpoint(ic.ClientCtx, c.ID, options) |
Therefore, nameOrID
args should be renamed to cid
.
If I have misunderstood, I will fix these changes.
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.
@sstosh, pkg/bindings
can be used by externals callers. So it does not matter (too) much how it's being used internally since both, ID and name, are supported.
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.
Thank you for your reply. I understand.
I'll change cid
back to nameOrID
.
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.
Thank you, @sstosh !
This commit fixes `container checkpoint --export` to print a rawInput or an error. Fixes: containers#15743 Signed-off-by: Toshiki Sonoda <[email protected]>
20aa7e7
to
d63e49a
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.
LGTM
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: Luap99, sstosh 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 |
/lgtm |
/hold cancel |
This commit fixes
container checkpoint --export
to print a rawInput or an error.
Fixes: #15743
Signed-off-by: Toshiki Sonoda [email protected]
Does this PR introduce a user-facing change?