Skip to content

Conversation

ymygogogo
Copy link

Details

There are some bugs in nydusify commit image, following bugs are fixed in this:

  • commit image on rename repository
    Use the mount blob api in the same repository
    lQLPKIG8PDKZOFHNAezNBmqwAcplACLtsPsHkBC2zJLfAQ_1642_492
    lQLPJwJk2O5LQlHNAxnNAs-wrQYQz9DBey8Hj7GUCxDCAA_719_793
    image

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.

@ymygogogo ymygogogo requested a review from a team as a code owner March 3, 2025 12:02
@ymygogogo ymygogogo requested review from jiangliu, changweige and adamqqqplay and removed request for a team March 3, 2025 12:02
Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.41%. Comparing base (9193160) to head (17c4a88).
Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            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     

see 2 files with indirect coverage changes

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
Copy link
Collaborator

imeoer commented Mar 4, 2025

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

@ymygogogo ymygogogo force-pushed the master branch 2 times, most recently from 606e15a to ad38596 Compare March 4, 2025 14:04
…uring commit

Signed-off-by: ymy <ymy@zetyun.com>
Signed-off-by: ymy <ymy@zetyun.com>
@ymygogogo
Copy link
Author

@imeoer It looks all right. Please review it for me

@imeoer imeoer merged commit 8b03fd7 into dragonflyoss:master Mar 4, 2025
24 checks passed
@@ -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 {
Copy link

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)
Copy link

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")
}

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