Skip to content

Comments

feat(src/internal/package2/pull.go): Check if package exists for OCI layers#3252

Closed
jamestexas wants to merge 2 commits intozarf-dev:mainfrom
jamestexas:issues/2780
Closed

feat(src/internal/package2/pull.go): Check if package exists for OCI layers#3252
jamestexas wants to merge 2 commits intozarf-dev:mainfrom
jamestexas:issues/2780

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

@netlify
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

@mkcp
Copy link
Contributor

mkcp commented Feb 13, 2025

Hey @jamestexas ! Is this something you'd still like to work on? It's still an impactful issue, let us know if you have any questions. 🙏

@jamestexas
Copy link
Contributor Author

Heya @mkcp this was waiting on an internal update to Zarf before it could get iterated on. I since was part of the RiF so don't have it on my priority list at this time, sorry for the trouble!

@AustinAbro321
Copy link
Member

Closing this as in #3767 we are instead caching each of the layers which will make subsequent pulls extremely fast

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

3 participants