-
Notifications
You must be signed in to change notification settings - Fork 198
feat: optimize package OCI pulls #3961
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
Conversation
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
✅ Deploy Preview for zarf-docs canceled.
|
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Codecov ReportAttention: Patch coverage is
🚀 New features to boost your workflow:
|
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
@@ -35,7 +35,7 @@ func TestTracker_ReportingCycle(t *testing.T) { | |||
lastTotalBytes.Store(totalBytes) | |||
} | |||
|
|||
testInterval := 10 * time.Millisecond | |||
testInterval := 30 * time.Millisecond |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This flaked on windows. If it happens again we may just rework this test, but I figure I'll try this to start
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's weird, it's possible this is an unrelated timing issue that was paved over by the wait from compress and uncompress. Something to track but not a blocker imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit then good to go
@@ -35,7 +35,7 @@ func TestTracker_ReportingCycle(t *testing.T) { | |||
lastTotalBytes.Store(totalBytes) | |||
} | |||
|
|||
testInterval := 10 * time.Millisecond | |||
testInterval := 30 * time.Millisecond |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's weird, it's possible this is an unrelated timing issue that was paved over by the wait from compress and uncompress. Something to track but not a blocker imo
Filter: filters.Empty(), | ||
PublicKeyPath: publicKeyPath, | ||
}) | ||
pkgLayout, err := pullOCI(ctx, pullOCIOpts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This just makes sense - it's always nice when the test case/usage gets simpler alongside a speedup.
Co-authored-by: Kit Patella <kit@defenseunicorns.com> Signed-off-by: Austin Abro <37223396+AustinAbro321@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Currently we archive a package after it's pulled, only to unarchive it after. This changes the logic to only archive a package pull when necessary saving time.
Testing on the uds-core package, it saves about 8 seconds on my machine https://github.com/defenseunicorns/uds-core/pkgs/container/packages%2Fuds%2Fcore
Checklist before merging