Skip to content

fix(release): retry crates.io rate limits during publish - #110

Merged
gRoussac merged 1 commit into
devfrom
ci/429_publish
Nov 18, 2026
Merged

gRoussac merged 1 commit into
devfrom
ci/429_publish

Conversation

@gRoussac

@gRoussac gRoussac commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Make the crates.io release workflow resilient to HTTP 429 rate limits.

  • Detect rate-limit responses from cargo publish and crates.io version lookups.
  • Wait until the reset time reported by crates.io, falling back to 60 seconds when no usable reset time is available.
  • Recheck whether the crate version has already been published before retrying, so an upload that succeeded despite a client-side failure is not repeated.
  • Bound retries and cumulative rate-limit waiting with configurable limits:
    • PUBLISH_MAX_ATTEMPTS: 6 attempts per crate by default (maximum 100).
    • PUBLISH_MAX_WAIT: 7,200 seconds per run by default (maximum 86,400).
  • Fail immediately for errors other than HTTP 429.
  • Increase the release publication job timeout to 180 minutes to accommodate bounded waits.

Test plan

  • Run the release workflow against a crates.io 429 response and verify it waits for the reset time before retrying.
  • Verify the 60-second fallback is used when the response has no usable reset time.
  • Verify retry attempts and cumulative waiting stop at their configured limits.
  • Verify non-429 publication failures are not retried.
  • Verify an already-published version is skipped and its sparse-index entry is awaited.

@Interchouette Interchouette changed the title 429 on publish fix(release): retry crates.io rate limits during publish Nov 18, 2026
@codecov

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@gRoussac
gRoussac marked this pull request as ready for review November 18, 2026 00:15
@gRoussac
gRoussac merged commit 0be340d into dev Nov 18, 2026
11 checks passed
@gRoussac
gRoussac deleted the ci/429_publish branch November 18, 2026 00:15
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.

2 participants