-
Notifications
You must be signed in to change notification settings - Fork 211
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: add namespace flag for nydusify commit. #1597
Conversation
PTAL :) @imeoer |
@@ -84,7 +85,7 @@ func (cm *Committer) Commit(ctx context.Context, opt Opt) error { | |||
return errors.Wrap(err, "parse target image name") | |||
} | |||
|
|||
inspect, err := cm.manager.Inspect(ctx, opt.ContainerID) | |||
inspect, err := cm.manager.Inspect(ctx, opt.ContainerID, opt.Namespace) |
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.
How about calling ctx = namespaces.WithNamespace(ctx, namespace)
before here.
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.
How about calling in nydusify.go
main
func?
Just at return cm.Commit(c.Context, opt)
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.
Better to put it in committer.go
, so we can import it as a package in other project. :)
4e1aafe
to
2076963
Compare
Signed-off-by: YuQiang <yu_qiang@mail.nwpu.edu.cn>
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, LGTM!
thanks~ |
Relevant Issue (if applicable)
#1596
Details
Add
namespace
flag fornydusify commit
.Types of changes
What types of changes does your PullRequest introduce? Put an
x
in all the boxes that apply:Checklist
Go over all the following points, and put an
x
in all the boxes that apply.