Skip to content

Use shared registries size limits and rate-limit gate - #516

Merged
simonchrz merged 2 commits into
mainfrom
use-shared-registry-policies
Oct 19, 2026
Merged

simonchrz merged 2 commits into
mainfrom
use-shared-registry-policies

Conversation

@andrew

@andrew andrew commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Use fetch.WithMaxArtifactSize and client.RateLimitGate from registries, removing proxy's local size wrapper and rate-limit transport. Apply the size option in both server and mirror setup, retain proxy's HTTP error handling and cache cleanup, and share one gate beneath authentication for metadata and artifact requests. Keep logging, metrics, hold reporting, download prechecks, and cached responses in proxy.

Uses registries v0.10.0, which includes git-pkgs/registries#102.

@andrew
andrew marked this pull request as ready for review October 19, 2026 07:20
Copilot AI balanced review requested due to automatic review settings October 19, 2026 07:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@simonchrz simonchrz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving. I compared the removed gate with registries/client line by line: same hold logic, and logging and metrics fire as before, now through OnHold/OnRelease. The fallback backoff no longer shifts by the strike count, so it can't overflow after a long run of strikes either.

One thing I checked because the order changed: the size limit now sits under the circuit breaker instead of above it, but the breaker skips ErrArtifactTooLarge and the fetcher doesn't retry it, so an oversized artifact can't trip the breaker for the host. Tests pass locally.

@simonchrz
simonchrz merged commit 8e04713 into main Oct 19, 2026
10 checks passed
@simonchrz
simonchrz deleted the use-shared-registry-policies branch October 19, 2026 11:28
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.

3 participants