Skip to content

fix(ci): retry GitLab mirror rate limits - #1001

Merged
ReenigneArcher merged 1 commit into
masterfrom
codex/fix-gitlab-mirror-rate-limits
Nov 9, 2026
Merged

ReenigneArcher merged 1 commit into
masterfrom
codex/fix-gitlab-mirror-rate-limits

Conversation

@ReenigneArcher

@ReenigneArcher ReenigneArcher commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

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 --check passed. 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

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@ReenigneArcher
ReenigneArcher merged commit dd8e904 into master Nov 9, 2026
22 checks passed
@ReenigneArcher
ReenigneArcher deleted the codex/fix-gitlab-mirror-rate-limits branch November 9, 2026 01:23
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.

1 participant