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

allow multiple images pull #975

Merged
merged 4 commits into from
Mar 30, 2021
Merged

allow multiple images pull #975

merged 4 commits into from
Mar 30, 2021

Conversation

michelpromonet
Copy link
Contributor

Hi,

Please find this PR that intend to pull multiple images and save it to a tar file that could be loaded by docker load.

It is a quick & dirty try, let me know if you think this feature extension is interesting or if there is an other way to do this with the cli.

Best Regards,
Michel.

@google-cla
Copy link

google-cla bot commented Mar 28, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

1 similar comment
@google-cla
Copy link

google-cla bot commented Mar 28, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link

google-cla bot commented Mar 28, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@michelpromonet
Copy link
Contributor Author

@googlebot I signed it!

@jonjohnsonjr
Copy link
Collaborator

Thanks for the PR!

It is a quick & dirty try, let me know if you think this feature extension is interesting or if there is an other way to do this with the cli.

Definitely interesting and something I'd like to support. CLI UX looks good to me, but I'm a little reluctant to modify the signature for crane.Save etc.

Do you mind instead adding three new functions?

  • crane.MultiSave
  • crane.MultiSaveLegacy
  • crane.MultiSaveOCI

Then we can rewrite Save{Legacy,OCI} as trivial implementations that just call into MultiSave... without breaking anything that depends on the Save functions today.

cmd/crane/cmd/pull.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr left a comment

Choose a reason for hiding this comment

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

LGTM beyond a couple small nits.

Can you also add godoc comments to the Multi funcs?

pkg/crane/pull.go Outdated Show resolved Hide resolved
pkg/crane/pull.go Outdated Show resolved Hide resolved
pkg/crane/pull.go Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Mar 30, 2021

Codecov Report

Merging #975 (7b7d5e8) into main (a11b12f) will decrease coverage by 0.16%.
The diff coverage is 75.00%.

❗ Current head 7b7d5e8 differs from pull request most recent head 934a314. Consider uploading reports for the commit 934a314 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #975      +/-   ##
==========================================
- Coverage   74.75%   74.59%   -0.17%     
==========================================
  Files         107      107              
  Lines        5007     5022      +15     
==========================================
+ Hits         3743     3746       +3     
- Misses        710      721      +11     
- Partials      554      555       +1     
Impacted Files Coverage Δ
pkg/crane/pull.go 71.42% <75.00%> (-22.69%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a11b12f...934a314. Read the comment docs.

@michelpromonet
Copy link
Contributor Author

Hi jonjohnsonjr,

Please find update adding comment on MultiWrite method and rework on MultiWriteOCI.

Best Regards,
Michel.

Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@jonjohnsonjr jonjohnsonjr merged commit 3259211 into google:main Mar 30, 2021
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.

None yet

3 participants