Skip to content

[Feature] [Platform] Improve Registry Performance #1934

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ajanikow
Copy link
Collaborator

No description provided.

@cla-bot cla-bot bot added the cla-signed label Jul 11, 2025
@ajanikow ajanikow force-pushed the feature/platform/improve_registry_performance branch from 38b9fa2 to d9953f2 Compare July 11, 2025 12:12
@ajanikow ajanikow requested a review from Copilot July 14, 2025 07:59
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces improvements to registry client performance by adding configurable request concurrency and a new registry list flag.

  • Default ReqConcurrent is set to 8 for all registry hosts.
  • A new registry.docker.endpoint flag (flagRegistryList) is added and registered in import/export commands.
  • Documentation, CRD schemas, and changelog are updated to reflect selector description fixes and the new feature.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/platform/regclient.go Set default ReqConcurrent and apply flagRegistryList values
pkg/platform/flags.go Define new flagRegistryList for boosted registries
pkg/platform/package_import.go Register flagRegistryList in import command
pkg/platform/package_export.go Register flagRegistryList in export command
pkg/crd/crds/backups-backuppolicy.schema.generated.yaml Update selector description to "ArangoDeployment"
pkg/apis/backup/v1/backup_policy_spec.go Fix selector comment, bump copyright year
docs/api/ArangoBackupPolicy.V1.md Update selector description to "ArangoDeployment"
CHANGELOG.md Add entry for "Improve Registry Performance"
Comments suppressed due to low confidence (2)

pkg/platform/flags.go:139

  • [nitpick] The flag name "registry.docker.endpoint" is misleading given it represents a list of registries. Consider renaming it to something like "registry.docker.list" or updating the description to match the name.
		Name:        "registry.docker.endpoint",

pkg/platform/regclient.go:67

  • No tests cover the new flagRegistryList parsing or the default ReqConcurrent behavior. Adding unit tests for these paths would help prevent regressions.
	regs, err := flagRegistryList.Get(cmd)

@@ -35,6 +35,10 @@ func getRegClient(cmd *cobra.Command) (*regclient.RegClient, error) {

slog.SetLogLoggerLevel(slog.LevelDebug)

flags = append(flags, regclient.WithConfigHostDefault(config.Host{
Copy link
Preview

Copilot AI Jul 14, 2025

Choose a reason for hiding this comment

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

The literal value ReqConcurrent: 8 appears multiple times. Extract this into a named constant (e.g., defaultReqConcurrent) to avoid magic numbers and improve maintainability.

Copilot uses AI. Check for mistakes.

v.Hostname = el
}

v.ReqConcurrent = 8
Copy link
Preview

Copilot AI Jul 14, 2025

Choose a reason for hiding this comment

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

The concurrency setting is applied twice in separate loops. Consider consolidating this logic to ensure DRY code and reduce potential for divergence in future updates.

Suggested change
v.ReqConcurrent = 8
v = setReqConcurrent(v)

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants