Skip to content

build(deps): update reqwest to 0.13.4 - #10

Merged
fredclausen merged 1 commit into
mainfrom
fix/reqwest-0.13
Aug 10, 2026
Merged

build(deps): update reqwest to 0.13.4#10
fredclausen merged 1 commit into
mainfrom
fix/reqwest-0.13

Conversation

@fredclausen

Copy link
Copy Markdown
Member

Supersedes #8, which Renovate could not complete on its own.

Why #8 failed

The bump left Cargo.toml and Cargo.lock disagreeing, because 0.13 renamed the rustls-tls feature to rustls. Cargo cannot resolve a feature that no longer exists, so every job failed at dependency resolution — not on anything in the code:

error: failed to select a version for the requirement `reqwest = "^0.13.0"`
package `github-ci-exporter` depends on `reqwest` with feature `rustls-tls`
but `reqwest` does not have that feature

renovate/artifacts failing was the tell: the lockfile regeneration never ran.

Two breaking changes mattered

1. rustls-tlsrustls. Mechanical.

2. Built-in CA roots were replaced by rustls-platform-verifier, which reads the system trust store. There is no system trust store in the Nix build sandbox:

Build(reqwest::Error { kind: Builder,
  source: General("No CA certificates were loaded from the system") })

13 tests passed locally and failed under nix build — that difference is the only reason this was caught before deploy. The same absence is plausible at runtime: the unit runs DynamicUser with ProtectSystem=strict.

Fixed by bundling Mozilla's roots via webpki-root-certs and passing them with tls_certs_only. Only api.github.com is contacted, so a fixed public-CA set is sufficient, and compiling the roots in makes the binary independent of whatever the host happens to have installed.

Also

The crypto provider changes from ring to aws-lc, which is 0.13's default. cargo-deny reports licences and advisories clean (aws-lc-sys builds C, already handled by the existing pkg-config native input).

Verification

  • 103 tests pass locally and inside the Nix sandbox
  • nix build .#github-ci-exporter succeeds
  • Real collection cycle against api.github.com completes: scrape_success 1, 15 repos
  • cargo xtask ci green; all 28 pre-commit hooks pass

Renovate could not do this itself (PR #8): the bump left Cargo.toml and
Cargo.lock disagreeing, because 0.13 renamed the `rustls-tls` feature to
`rustls`. Cargo cannot resolve a feature that no longer exists, so every
job failed at dependency resolution rather than on anything in the code.

Two breaking changes mattered:

- `rustls-tls` -> `rustls`. Mechanical.

- Built-in CA roots were replaced by rustls-platform-verifier, which
  reads the system trust store. There is no system trust store in the
  Nix build sandbox, so TLS setup failed outright with "No CA
  certificates were loaded from the system" -- 13 tests passed locally
  and failed under `nix build`, which is the only reason this was caught
  before deploy. The same absence is plausible at runtime under the
  hardened unit, which runs DynamicUser with ProtectSystem=strict.

  Fixed by bundling Mozilla's roots via webpki-root-certs and passing
  them with `tls_certs_only`. Only api.github.com is contacted, so a
  fixed public-CA set is sufficient, and compiling the roots in makes the
  binary independent of ambient host state rather than dependent on
  whatever the host happens to have installed.

The crypto provider also changes from ring to aws-lc, which is 0.13's
default. cargo-deny reports licences and advisories clean.

Verified: 103 tests pass locally and in the sandbox, `nix build`
succeeds, and a real collection cycle against api.github.com completes
with scrape_success 1.
Copilot AI lite review requested due to automatic review settings August 10, 2026 18:35
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 6 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5c9b0e9c-da78-4ef4-99d0-f227c70fa2d3

📥 Commits

Reviewing files that changed from the base of the PR and between 9c2fa65 and 6269608.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • Cargo.toml
  • github-ci-exporter/Cargo.toml
  • github-ci-exporter/src/github/client.rs

Comment @coderabbitai help to get the list of available commands.

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

Updates the workspace to reqwest 0.13.4 and adapts TLS configuration to avoid relying on system CA roots (which are unavailable in the Nix build sandbox / may be unavailable under hardened systemd settings).

Changes:

  • Bump reqwest to 0.13.4 and update the feature flag from rustls-tlsrustls.
  • Add webpki-root-certs and configure the GitHub HTTP client to use bundled Mozilla roots via tls_certs_only.
  • Regenerate Cargo.lock to reflect the new dependency graph (including aws-lc-related crates).

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
github-ci-exporter/src/github/client.rs Configures reqwest’s TLS root set using bundled Mozilla CAs via tls_certs_only.
github-ci-exporter/Cargo.toml Adds webpki-root-certs as a workspace dependency for the crate.
Cargo.toml Bumps reqwest to 0.13.4, switches feature to rustls, adds webpki-root-certs.
Cargo.lock Updates the resolved dependency graph for reqwest 0.13.4 and new TLS dependencies.
Suppressed comments (1)

github-ci-exporter/src/github/client.rs:205

  • .tls_certs_only(...) is applied unconditionally, which can break the documented ability to override github_api_url/github_graphql_url for GitHub Enterprise (especially if it uses a private CA not in Mozilla's bundle). Consider scoping the bundled-root behavior to the default public GitHub endpoints, or making the root set configurable.
            .tls_certs_only(
                webpki_root_certs::TLS_SERVER_ROOT_CERTS
                    .iter()
                    .map(|cert| reqwest::Certificate::from_der(cert))
                    .collect::<Result<Vec<_>, _>>()

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +193 to +200
// Trust Mozilla's bundled CA set rather than the system trust
// store. reqwest 0.13 switched to rustls-platform-verifier, which
// reads system roots; those are absent in the Nix build sandbox
// (TLS setup fails with "No CA certificates were loaded from the
// system") and are not guaranteed under a hardened unit with
// ProtectSystem=strict. Only api.github.com is contacted, so a
// fixed public-CA set is sufficient and makes the binary
// independent of ambient host state.
@fredclausen
fredclausen merged commit 765031b into main Aug 10, 2026
9 checks passed
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