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: add namespace flag for nydusify commit. #1597

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

PerseidMeteor
Copy link
Contributor

Relevant Issue (if applicable)

#1596

Details

Add namespace flag for nydusify commit.

Types of changes

What types of changes does your PullRequest introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

Go over all the following points, and put an x in all the boxes that apply.

  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@PerseidMeteor PerseidMeteor requested a review from a team as a code owner July 6, 2024 08:57
@PerseidMeteor PerseidMeteor requested review from bergwolf, imeoer and power-more and removed request for a team July 6, 2024 08:57
@PerseidMeteor
Copy link
Contributor Author

PTAL :) @imeoer

contrib/nydusify/cmd/nydusify.go Show resolved Hide resolved
@@ -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)
Copy link
Collaborator

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.

Copy link
Contributor Author

@PerseidMeteor PerseidMeteor Jul 8, 2024

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)

Copy link
Collaborator

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

Signed-off-by: YuQiang <yu_qiang@mail.nwpu.edu.cn>
Copy link
Collaborator

@imeoer imeoer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, LGTM!

@imeoer imeoer merged commit 19b09ed into dragonflyoss:master Jul 9, 2024
20 of 24 checks passed
@shusley244
Copy link

thanks~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants