ci: force HTTP/1.1 + retries for crates.io fetches (fix HTTP/2 download flake)#1020
Merged
Conversation
…ad flake) Dependency downloads on CI runners intermittently fail with "[16] Error in the HTTP2 framing layer" (criterion's transitive deps — cast/alloca/oorandom/itertools — and others), reddening otherwise-passing jobs. Coverage, Test, MSRV (1.88), Boolean perf, and WASM Size Report all hit it across today's PRs, each needing a manual re-run. Set `[http] multiplexing = false` (HTTP/1.1 sidesteps the HTTP/2 multiplexing fault) + `[net] retry = 10` in .cargo/config.toml. Downloads only matter on a cold cache (mostly CI), so the local-dev cost is negligible.
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s Cargo configuration to reduce intermittent CI flakes during crates.io dependency downloads by forcing Cargo to avoid HTTP/2 multiplexing and to retry transient network failures.
Changes:
- Configure Cargo to use HTTP/1.1 for registry downloads (
[http] multiplexing = false). - Increase Cargo network retry attempts for transient failures (
[net] retry = 10). - Add inline documentation describing the CI flake and rationale for the settings.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Greptile SummaryThis PR updates Cargo fetch settings to reduce CI dependency download flakes. The main changes are:
Confidence Score: 5/5Safe to merge. The change is limited to Cargo network configuration for dependency fetching and does not alter application, library, or build logic.
What T-Rex did
Reviews (1): Last reviewed commit: "ci: force HTTP/1.1 + retries for crates...." | Re-trigger Greptile |
Contributor
WASM Binary Size
✅ No size change. |
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.
What
Add
[http] multiplexing = false+[net] retry = 10to.cargo/config.tomlso dependency fetches stop reddening CI.Why
crates.io downloads on the runners intermittently fail with
[16] Error in the HTTP2 framing layerwhile fetchingcriterion's transitive deps (cast,alloca,oorandom,itertools) and others. Today alone this flaked Coverage, Test, MSRV (1.88), Boolean perf, and WASM Size Report across the render + revolve PRs — each a spurious red that only cleared on a manual re-run.The fix
[http] multiplexing = false— cargo uses HTTP/1.1 instead of HTTP/2, sidestepping the HTTP/2 framing fault that causes the resets.[net] retry = 10— retries transient network failures.Tradeoff
HTTP/1.1 has no connection multiplexing, so cold-cache fetches open more connections (marginally slower). Downloads only happen on a cold cargo cache — almost always CI — so local-dev impact is negligible, and the reliability win removes a recurring class of spurious CI failures + manual re-runs.
Summary by cubic
Force HTTP/1.1 and add retries for Cargo dependency downloads to stop crates.io HTTP/2 flakiness in CI. This removes intermittent red jobs without affecting local dev.
[http] multiplexing = falseto use HTTP/1.1 for fetches.[net] retry = 10to retry transient network errors.Written for commit 3243e4d. Summary will update on new commits.