Skip to content

ci: force HTTP/1.1 + retries for crates.io fetches (fix HTTP/2 download flake)#1020

Merged
andymai merged 1 commit into
mainfrom
fix/ci-crates-io-flake
Jun 26, 2026
Merged

ci: force HTTP/1.1 + retries for crates.io fetches (fix HTTP/2 download flake)#1020
andymai merged 1 commit into
mainfrom
fix/ci-crates-io-flake

Conversation

@andymai

@andymai andymai commented Jun 26, 2026

Copy link
Copy Markdown
Owner

What

Add [http] multiplexing = false + [net] retry = 10 to .cargo/config.toml so dependency fetches stop reddening CI.

Why

crates.io downloads on the runners intermittently fail with [16] Error in the HTTP2 framing layer while fetching criterion'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.

  • Bug Fixes
    • Set [http] multiplexing = false to use HTTP/1.1 for fetches.
    • Set [net] retry = 10 to retry transient network errors.
    • Stabilizes Coverage, Test, MSRV, Boolean perf, and WASM Size jobs; only minor cold-cache slowdown in CI.

Written for commit 3243e4d. Summary will update on new commits.

Review in cubic

…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.
Copilot AI review requested due to automatic review settings June 26, 2026 18:23

Copilot AI 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.

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.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Jun 26, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates Cargo fetch settings to reduce CI dependency download flakes. The main changes are:

  • Disables Cargo HTTP/2 multiplexing so fetches use HTTP/1.1.
  • Raises Cargo network retries to 10 for transient download failures.
  • Documents the crates.io HTTP/2 framing failures this configuration targets.

Confidence Score: 5/5

Safe to merge.

The change is limited to Cargo network configuration for dependency fetching and does not alter application, library, or build logic.

T-Rex T-Rex Logs

What T-Rex did

  • Reviewed the before state in the cargo-fetch-config log for commit cf1dc6e and confirmed there were no [http] or [net] entries for http.multiplexing or net.retry.
  • Checked the after state in the cargo-fetch-config log for commit 3243e4d and confirmed [http] multiplexing = false and [net] retry = 10, parsed as bool and int, with contract_match=True.
  • Verified cargo availability by inspecting the cargo-availability proof, which shows cargo is not installed because cargo --version could not run.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "ci: force HTTP/1.1 + retries for crates...." | Re-trigger Greptile

@github-actions

Copy link
Copy Markdown
Contributor

WASM Binary Size

File main PR Delta
brepkit_wasm.wasm 5.60 MB 5.60 MB 0 KB (0%)

✅ No size change.

@andymai andymai merged commit 1d06afc into main Jun 26, 2026
22 checks passed
@andymai andymai deleted the fix/ci-crates-io-flake branch June 26, 2026 18:31
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