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(src/internal/package2/pull.go): Check if package exists for OCI layers #3252

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jamestexas
Copy link
Contributor

@jamestexas jamestexas commented Nov 20, 2024

Description

This PR's goal is to check if we have already have an OCI image locally before we pull it again. This should help ensure we don't re-pull each time. Tests will be done after the upcoming updates to publish are done.

This is the output comparing the execution time from a repeat run (removed other bits of the logging just to denote the pieces that mattered):

Output from the script:

First Run:

> TIMEFMT=$'%*E total elapsed time\n%*U user CPU time\n%*S system CPU time'
time ./build/zarf-mac-apple package pull oci://ghcr.io/zarf-dev/packages/dos-games:1.1.0 --key=https://zarf.dev/cosign.pub -a arm64

5.109 total elapsed time
0.207 user CPU time
0.274 system CPU time

Repeat Run:

└> TIMEFMT=$'%*E total elapsed time\n%*U user CPU time\n%*S system CPU time'
time ./build/zarf-mac-apple package pull oci://ghcr.io/zarf-dev/packages/dos-games:1.1.0 --key=https://zarf.dev/cosign.pub -a arm64

0.866 total elapsed time
0.105 user CPU time
0.072 system CPU time

Related Issue

Fixes #2780

Relates to #

Checklist before merging

Copy link

netlify bot commented Nov 20, 2024

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 8c4ffd2
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/673e34e5a2d1cd0008d5270b

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.

Pre package pull check
1 participant