-
Notifications
You must be signed in to change notification settings - Fork 110
Fix some bugs in image conversion #193
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
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 for the contribution!
return nil, errors.Wrap(err, "read target image index json") | ||
} | ||
// isManifestModified is a function to check whether the manifest is modified. | ||
isManifestModified := func(manifest ocispec.Descriptor) bool { |
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.
Maybe we can check whether it is nydus manifest (name it isNydusManifest
) by recognizing bootstrap annotation, which would be safer?
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.
Then we need to read json from the content store for each manifest descriptor.
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.
Maybe we can store the modified manifest digest in a map in the manifest conversion hook?
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.
Well, just checking if the manifest is changed should also work.
e26e440
to
df536dc
Compare
df536dc
to
f310f09
Compare
@imeoer Can you please rerun the action? There may be a network error. Thanks :) |
/retest |
The current main branch has Golang race problem, which fails this PR. I will fix it |
Please rebase to the latest main branch. |
…rtHookFunc`. 1. append `nydus.remoteimage.v1` to `os.features` of the manifest descriptor in the index 2. add `"containerd.io/snapshot/nydus-blob": "true"` to the annotations of the blob layer descriptor in the manifest 3. avoid appending duplicate bootstrap layer digest to the diffID list of the config This commit also adds a smoke test `TestContainerdImageConvert` to make sure `LayerConvertFunc` and `ConvertHookFunc` work well with the containerd image conversion library. Signed-off-by: Nan Li <loheagn@icloud.com>
f310f09
to
528734c
Compare
This patch fixes some bugs in image conversion using
LayerConvertFunc
andConvertHookFunc
.nydus.remoteimage.v1
toos.features
of the manifest descriptor in the index"containerd.io/snapshot/nydus-blob": "true"
to the annotations of the blob layer descriptor in the manifestThis patch also adds a smoke test
TestContainerdImageConvert
to make sureLayerConvertFunc
andConvertHookFunc
work well with the containerd image conversion library.Signed-off-by: Nan Li loheagn@icloud.com