Repository navigation
Use shared registries size limits and rate-limit gate - #516
Conversation
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
Use
fetch.WithMaxArtifactSizeandclient.RateLimitGatefrom 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.