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: add concurrency support for pull and push operations #45

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

chlins
Copy link
Contributor

@chlins chlins commented Dec 17, 2024

This pull request introduces several enhancements and refactorings to improve the concurrency and configuration handling of the pull and push commands. The most important changes include the addition of concurrency options, validation for configuration, and refactoring of backend options.

Enhancements to Concurrency:

  • Added a new concurrency option to the pull and push commands, allowing users to specify the number of concurrent operations. (cmd/pull.go, cmd/push.go, pkg/config/pull.go, pkg/config/push.go, pkg/backend/options.go) [1] [2] [3] [4] [5]

Configuration Validation:

  • Introduced validation for the pull and push configurations to ensure the concurrency value is valid. (cmd/pull.go, cmd/push.go, pkg/config/pull.go, pkg/config/push.go) [1] [2] [3] F52d5529L25R33)

Refactoring of Backend Options:

  • Refactored the backend options to use a more streamlined approach for setting options, including the new concurrency option. (pkg/backend/options.go, cmd/login.go, cmd/pull.go, cmd/push.go) [1] [2] [3] [4]

Parallelization of Layer Copy:

  • Implemented parallelization of layer copy operations in the pull and push backend methods using errgroup. (pkg/backend/pull.go, pkg/backend/push.go) [1] [2]

Dependency Addition:

  • Added the errgroup package to handle concurrent operations in the backend. (pkg/backend/pull.go, pkg/backend/push.go) [1] [2]

Copy link
Contributor

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@gaius-qi gaius-qi merged commit b357fd6 into main Dec 17, 2024
5 checks passed
@gaius-qi gaius-qi deleted the feat/parallel branch December 17, 2024 02:39
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.

2 participants