Skip to content

cargo-mono: remove sparse index prefetch timeout#390

Merged
kdy1 merged 1 commit intomainfrom
kdy1/cargo-mono-remove-sparse-index-prefetch-timeout
Apr 18, 2026
Merged

cargo-mono: remove sparse index prefetch timeout#390
kdy1 merged 1 commit intomainfrom
kdy1/cargo-mono-remove-sparse-index-prefetch-timeout

Conversation

@kdy1
Copy link
Copy Markdown
Contributor

@kdy1 kdy1 commented Apr 18, 2026

Summary

  • remove the explicit 15s reqwest timeout from cargo-mono sparse index prefetch during publish
  • keep existing prefetch concurrency, rate-limit retry, and already-published skip behavior unchanged
  • document that crates.io sparse-index prefetch relies on the HTTP client's default timeout behavior

Why

cargo-mono publish prefetch could fail early on slower registry responses because it enforced a separate client-side timeout for sparse index lookups. Removing that override avoids premature lookup failures without changing the existing publish retry and backoff behavior.

Impact

  • sparse-index prefetch no longer imposes its own client-side HTTP timeout
  • operator-facing CLI and environment-variable interfaces stay unchanged
  • project and crate contracts now describe the intended timeout behavior

Validation

  • cargo fmt --all --check
  • cargo test

@kdy1 kdy1 marked this pull request as ready for review April 18, 2026 09:28
@kdy1 kdy1 enabled auto-merge (squash) April 18, 2026 09:28
@kdy1 kdy1 merged commit 6bce2c0 into main Apr 18, 2026
16 checks passed
@kdy1 kdy1 deleted the kdy1/cargo-mono-remove-sparse-index-prefetch-timeout branch April 18, 2026 09:29
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9bf72cbcac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

.timeout(PREFETCH_HTTP_TIMEOUT)
.build()
{
let http_client = match reqwest::blocking::Client::builder().build() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore bounded timeout for sparse-index HTTP requests

Building the reqwest client without .timeout(...) removes the only per-request deadline for sparse-index prefetch, and reqwest’s default is to wait indefinitely; in run_parallel_sparse_index_lookup, the scoped worker joins wait for every lookup to return, so a single stalled TCP/HTTP read can block cargo mono publish forever before publish retries ever run. This can deadlock CI release jobs on transient network hangs instead of failing fast and retrying.

Useful? React with 👍 / 👎.

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