Skip to content

fix(publish): retry cargo publish on transient registry index lag#622

Merged
BryanFRD merged 1 commit into
mainfrom
fix/cargo-publish-retry-index-lag
Jun 28, 2026
Merged

fix(publish): retry cargo publish on transient registry index lag#622
BryanFRD merged 1 commit into
mainfrom
fix/cargo-publish-retry-index-lag

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Releasing a multi-crate workspace to a private registry (kellnr) can fail when a dependent publishes before a just-published dependency lands in the sparse index — cargo errors with no matching package / required by package, which the publisher surfaced as a fatal E1018 (seen on FerrLabs/Kit 2026-06-24; recovered only via a manual re-run the next day).

The cargo publisher now retries cargo publish up to 3 times (5s then 15s backoff) on transient failures — sparse-index resolution lag and network blips (connection reset/refused, timeouts, 502/503/504) — while keeping the existing idempotent "already uploaded" → skip. A genuinely missing/misconfigured dependency still matches as transient but simply fails again after the retries are spent (slower failure, but the release survives index lag without a manual re-run). New unit test pins the transient classifier; cargo test, cargo clippy, cargo fmt all green locally.

Closes #621

@BryanFRD BryanFRD enabled auto-merge (squash) June 28, 2026 07:46
@BryanFRD BryanFRD merged commit cca1ad8 into main Jun 28, 2026
39 checks passed
@BryanFRD BryanFRD deleted the fix/cargo-publish-retry-index-lag branch June 28, 2026 07:49

@github-actions github-actions Bot 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.

Benchmark

Details
Benchmark suite Current: db2c85b Previous: 0b5fe57 Ratio
validate/single 20046 ns/iter (± 206)
validate/mono_50 364918 ns/iter (± 6221)
validate/mono_100 716458 ns/iter (± 20134)

This comment was automatically generated by workflow using github-action-benchmark.

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.

Release: cargo publish fails on private-registry index lag (E1018) instead of retrying

1 participant