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

feat:support multi arch for load and save #2062

Merged
merged 2 commits into from
Feb 27, 2023
Merged

Conversation

kakaZhou719
Copy link
Member

@kakaZhou719 kakaZhou719 commented Feb 24, 2023

Describe what this PR does / why we need it

support multi arch for load and save, no need to care about the image arch.

save: could save with id Or name.

sealer save bf5e56e64dd9 -o abc.tar
sealer save abc:v1 -o abc.tar

load:

sealer load -i abc.tar

Does this pull request fix one issue?

Describe how you did it

Describe how to verify it

Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2023

Codecov Report

Base: 18.64% // Head: 18.35% // Decreases project coverage by -0.29% ⚠️

Coverage data is based on head (273fd47) compared to base (af34af6).
Patch coverage: 0.00% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2062      +/-   ##
==========================================
- Coverage   18.64%   18.35%   -0.29%     
==========================================
  Files          99       99              
  Lines        9179     9322     +143     
==========================================
  Hits         1711     1711              
- Misses       7243     7386     +143     
  Partials      225      225              
Impacted Files Coverage Δ
pkg/imageengine/buildah/load.go 0.00% <0.00%> (ø)
pkg/imageengine/buildah/manifest.go 0.00% <0.00%> (ø)
pkg/imageengine/buildah/save.go 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

// delete it if manifestName is already used
_, err = engine.ImageRuntime().LookupManifestList(manifestName)
if err == nil {
delErr := engine.DeleteManifests([]string{manifestName}, &options.ManifestDeleteOpts{})
Copy link
Collaborator

Choose a reason for hiding this comment

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

print a warning log

if err != nil {
return fmt.Errorf("failed to create new manifest %s :%v ", manifestName, err)
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

defer deleting manifest if err not equals nil

Copy link
Collaborator

@starnop starnop left a comment

Choose a reason for hiding this comment

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

LGTM

@starnop starnop merged commit 707f4d1 into sealerio:main Feb 27, 2023
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