Skip to content

Don't download files that are already cached #1877

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

Merged
merged 4 commits into from
Oct 4, 2023

Conversation

afbjorklund
Copy link
Member

@afbjorklund afbjorklund commented Oct 2, 2023

The nerdctl(-full) archive has already been downloaded to the cache (during create),
so don't log downloading it again (during start) - unless file is missing or digest fails.

Don't use files for different arch, or check for local files that are not available in the cache.
Refactor common methods out from the longer functions, so that they can be reused.

Closes #1875

Edit: it wasn't actually downloading the file again, just spamming the INFO log about it

@AkihiroSuda
Copy link
Member

Thanks, looks good but a couple of nits

@AkihiroSuda AkihiroSuda added this to the v0.18.0 milestone Oct 3, 2023
@afbjorklund afbjorklund marked this pull request as draft October 3, 2023 09:16
This will return any files already in the cache,
with valid digest, but not download any new ones.

Signed-off-by: Anders F Björklund <[email protected]>
The nerdctl archive has already been downloaded
to the cache, so don't log downloading it again.

Signed-off-by: Anders F Björklund <[email protected]>
@afbjorklund afbjorklund marked this pull request as ready for review October 3, 2023 14:55
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit 23850b4 into lima-vm:master Oct 4, 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.

Cut down on the amount of logging when nerdctl-full cache already exist
2 participants