-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Transfer export image #8191
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
Transfer export image #8191
Conversation
|
Skipping CI for Draft Pull Request. |
|
/test all |
|
needs rebase |
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Derek McGowan <[email protected]>
eee7692 to
3f33fcb
Compare
mikebrow
left a comment
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.
LGTM.. just had one comment
cmd/ctr/commands/images/export.go
Outdated
| return err | ||
| } | ||
|
|
||
| return nil |
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.
nit ... without the progress update here.. return err would be the same as !=nil return.. then return nil here
Signed-off-by: Derek McGowan <[email protected]>
3f33fcb to
13bf556
Compare
mikebrow
left a comment
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.
LGTM
Update fork-external/main with upstream main at commit [081d818](containerd@081d818) Marged upstream container/main into fork-external/main Related work items: containerd#7864, containerd#7954, containerd#8041, containerd#8044, containerd#8051, containerd#8062, containerd#8096, containerd#8103, containerd#8109, containerd#8110, containerd#8113, containerd#8114, containerd#8119, containerd#8120, containerd#8128, containerd#8130, containerd#8134, containerd#8140, containerd#8142, containerd#8143, containerd#8152, containerd#8154, containerd#8162, containerd#8164, containerd#8165, containerd#8172, containerd#8173, containerd#8177, containerd#8178, containerd#8181, containerd#8183, containerd#8187, containerd#8188, containerd#8189, containerd#8190, containerd#8191, containerd#8192, containerd#8193
Carry of #7916
Ref #7592
Summary
Implement exporting image using the new
TransferAPI.Implementation Details
Invoke the
TransferAPI with a dummyimage.Storeas source andarchive.ImageExportStreamas destination.The reason why a dummy
image.Storeis chosen as source here is I learnt that the images to export are actually read on the containerd side, notctrand we need to distinguish the export scenario from the others, so I choose to send a dummyimage.Storeto tell the local transfer service about that.In addition, I have added some options to the
archive.ImageExportStreamto gain the same ability as "non-local" export. These options are hold in a config struct, does not follow the functional options pattern, b/c I think this would save me some typings. This might be opinionated, I could switch to functional options if that's necessary.