-
Notifications
You must be signed in to change notification settings - Fork 231
nydusify: fix the issue of blob not found when modifying image name d… #1673
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1673 +/- ##
==========================================
- Coverage 60.42% 60.41% -0.01%
==========================================
Files 146 146
Lines 48943 48943
Branches 46380 46380
==========================================
- Hits 29573 29571 -2
- Misses 17906 17907 +1
- Partials 1464 1465 +1 |
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!
@ymydb Plz add the SOB in your commit to pass the DCO check. :) And also fix the lint check in https://github.com/dragonflyoss/nydus/actions/runs/13630416687/job/38170584022?pr=1673 (this seems unrelated to your PR, maybe help to fix it if you're interested, it's not a merge blocker. :)) |
606e15a
to
ad38596
Compare
…uring commit Signed-off-by: ymy <ymy@zetyun.com>
Signed-off-by: ymy <ymy@zetyun.com>
@imeoer It looks all right. Please review it for me |
@@ -107,6 +112,18 @@ func (cm *Committer) Commit(ctx context.Context, opt Opt) error { | |||
return errors.Wrap(err, "obtain bootstrap FsVersion and Compressor") | |||
} | |||
|
|||
// Push lower blobs | |||
for idx := range image.Manifest.Layers { |
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
for idx, layer := range image.Manifest.Layers {
layer := image.Manifest.Layers[idx] | ||
if layer.MediaType == utils.MediaTypeNydusBlob { | ||
name := fmt.Sprintf("blob-mount-%d", idx) | ||
_, err := cm.pushBlob(ctx, name, layer.Digest, originalSourceRef, targetRef, opt.TargetInsecure, 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.
How about
if _, err := cm.pushBlob(ctx, name, layer.Digest, originalSourceRef, targetRef, opt.TargetInsecure, image); err != nil {
return errors.Wrap(err, "push lower blob")
}
Details
There are some bugs in nydusify commit image, following bugs are fixed in this:
Use the mount blob api in the same repository
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.