Repository navigation
fix(ci): retry GitLab mirror rate limits - #1001
Merged
Merged
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
The first multi-org mirror run failed 47 of 86 repositories: 33 HTTP 429 responses, eight attempts to parse plain-text throttling responses as JSON, and six metadata-update 404s after successful project creation.
Namespace preparation and shell delivery now use one GitLab request helper. It retries HTTP 429 responses for up to five total attempts, honors Retry-After seconds/dates, and uses exponential fallback backoff. Server cooldowns longer than five minutes are reported without retrying early. Non-JSON errors retain their HTTP status, and failures include bounded, credential-redacted API details and request IDs.
Other errors and ambiguous network failures do not replay mutations. Metadata 404s remain failures with better diagnostics; this PR does not establish their original cause or recreate those projects. Existing mirror identity, namespace, and private-visibility checks remain in place.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Testing
node --test: 222 passed, including 27 focused mirror/request tests. Regressions cover recovery from plain-text throttling during namespace preparation, Retry-After seconds/dates, backoff and retry exhaustion, long cooldowns, unchanged mutation payloads, HTTP 404 diagnostics, credential redaction, fixed API origin, and the shell-facing CLI stdout/stderr contract.ShellCheck 0.11.0, Bash syntax validation, and
git diff --checkpassed. GitLab responses and waits are mocked; no live mirror rerun or GitLab mutation was performed while preparing this fix. Hosted configuration validation/tests, Common Lint, CodeQL, the organization-sync dry run, SonarCloud Code Analysis, GitHub's SonarCloud code-scanning check, and Read the Docs all passed on this PR head.Type of Change
Checklist
AI Usage
See our AI usage policy.