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: parallelize copy/client.ImageExistsAtRemote calls #73

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

Conversation

aslafy-z
Copy link

@aslafy-z aslafy-z commented Mar 31, 2023

Fixes #72

For 800 images:
Before: 3m21s
After: 10s

This depends on google/go-containerregistry#1628. At least, backoff strategy will not be applied before that PR is released.

internal/commands/copy.go Outdated Show resolved Hide resolved
internal/commands/copy.go Outdated Show resolved Hide resolved
@aslafy-z aslafy-z marked this pull request as ready for review April 3, 2023 11:02
@aslafy-z
Copy link
Author

aslafy-z commented Apr 3, 2023

@jpreese Here you go, you can check the result at: https://github.com/aslafy-z/sinker/releases/tag/v0.19.0-rc.1

Copy link
Author

@aslafy-z aslafy-z left a comment

Choose a reason for hiding this comment

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

Wait for release of upstream and upgrade

@@ -33,9 +34,21 @@ func New(logInfo func(format string, args ...interface{})) (Client, error) {
return Client{}, fmt.Errorf("new docker client: %w", err)
}

remoteOptions := []remote.Option{
remote.WithAuthFromKeychain(authn.DefaultKeychain),
remote.WithRetryBackoff(remote.Backoff{
Copy link
Author

Choose a reason for hiding this comment

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

@@ -33,9 +34,21 @@ func New(logInfo func(format string, args ...interface{})) (Client, error) {
return Client{}, fmt.Errorf("new docker client: %w", err)
}

remoteOptions := []remote.Option{
remote.WithAuthFromKeychain(authn.DefaultKeychain),
remote.WithRetryBackoff(remote.Backoff{
Copy link
Author

Choose a reason for hiding this comment

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

Check what's the status of the withRetryBackoff pr

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.

Parallelize copy/client.ImageExistsAtRemote calls
1 participant