Skip to content

refactor: migrate HTTP & networking deps to workspace level (phase 4bis) - #2350

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
mainfrom
yannham/workspace-deps-phase-4bis
Sep 3, 2026
Merged

refactor: migrate HTTP & networking deps to workspace level (phase 4bis)#2350
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
mainfrom
yannham/workspace-deps-phase-4bis

Conversation

@yannham

@yannham yannham commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Moves the HTTP & networking dependencies to [workspace.dependencies]:
http, bytes, http-body-util, httpmock, reqwest, httparse,
mime, sha2, base64, percent-encoding, rustls-platform-verifier,
flate2, zstd, fastrand, once_cell and regex. This is an additional phase before phase 5 of the original plan.

All workspace entries are version-only with default-features = false; each
leaf crate opts into exactly the features it needs (mostly std). Two
documented exceptions where the no-default-features build is unusable:

  • flate2 needs a compression backend; rust_backend (pure Rust, no C
    dependency) is the baseline.
  • httpmock 0.8.0-alpha.1 does not compile with default-features = false:
    its own readers.rs calls req.cookies() unconditionally while that
    method is gated behind the cookies feature (upstream alpha bug).

Motivation

Single source of truth per dependency version, no accidental skew, shorter
leaf-crate manifests.

Additional Notes

  • Cargo.lock only bumps headers 0.4.0 -> 0.4.1 and sha1 0.10.6 ->
    0.10.7 (transitive of httpmock's cookies feature).
  • Dev-only duplicates (serial_test, proptest, duplicate,
    pretty_assertions) are left for a later step.

How to test the change?

  • cargo check --workspace
  • cargo nextest run on the affected crates
  • cargo ffi-test

@yannham yannham changed the title refactor: migrate HTTP & networking deps to workspace level (phase 5) refactor: migrate HTTP & networking deps to workspace level (phase 4bis) Aug 13, 2026
@yannham
yannham marked this pull request as ready for review August 13, 2026 09:12
@yannham
yannham requested review from a team as code owners August 13, 2026 09:12
@yannham
yannham requested review from leoromanovsky and pavlokhrebto and removed request for a team August 13, 2026 09:12

@datadog-prod-us1-6 datadog-prod-us1-6 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.

Datadog Autotest: PASS

More details

The migrated dependencies preserve the production crates’ effective TLS, compression, and standard-library capabilities: TLS callers still select their crypto provider explicitly, while flate2 retains a usable Rust backend. The lockfile changes are confined to httpmock’s test-only transitive dependencies.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit ecc4a43 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Aug 13, 2026

Copy link
Copy Markdown

Tests

All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 76.97% (+0.08%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 58af593 | Docs | View more details | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.45 MB 8.45 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 91.20 MB 91.21 MB +.01% (+13.64 KB) 🔍
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 102.51 MB 102.51 MB -0% (-1.95 KB) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.38 MB 11.38 MB +0% (+64 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 27.29 MB 27.28 MB --.02% (-7.50 KB) 💪
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 96.08 KB 96.08 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 185.15 MB 185.12 MB --.01% (-32.00 KB) 💪
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 802.82 MB 799.90 MB --.36% (-2.92 MB) 💪
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 8.97 MB 8.96 MB --.03% (-3.00 KB) 💪
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 96.08 KB 96.08 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 26.19 MB 26.18 MB --.02% (-8.00 KB) 💪
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 52.12 MB 52.11 MB --.02% (-11.00 KB) 💪
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 23.78 MB 23.78 MB +0% (+1.00 KB) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 97.58 KB 97.58 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 190.15 MB 190.15 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 786.74 MB 784.91 MB --.23% (-1.83 MB) 💪
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 6.93 MB 6.93 MB -0% (-512 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 97.58 KB 97.58 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 28.16 MB 28.15 MB --.02% (-8.00 KB) 💪
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 49.62 MB 49.61 MB --.01% (-7.48 KB) 💪
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 81.35 MB 81.37 MB +.02% (+24.55 KB) 🔍
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 9.39 MB 9.39 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 97.11 MB 97.11 MB -0% (-6.07 KB) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.44 MB 11.44 MB --.03% (-4.07 KB) 💪

@pr-commenter

pr-commenter Bot commented Aug 13, 2026

Copy link
Copy Markdown

Benchmarks

Comparison

Benchmark execution time: 2026-09-02 14:20:18

Comparing candidate commit 58af593 in PR branch yannham/workspace-deps-phase-4bis with baseline commit 05ef6f7 in branch main.

Found 14 performance improvements and 3 performance regressions! Performance is the same for 152 metrics, 10 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:credit_card/is_card_number/x371413321323331

  • 🟩 execution_time [-404.615ns; -401.850ns] or [-5.910%; -5.869%]
  • 🟩 throughput [+9108470.471op/s; +9171507.422op/s] or [+6.236%; +6.280%]

scenario:credit_card/is_card_number_no_luhn/x371413321323331

  • 🟩 execution_time [-402.321ns; -399.444ns] or [-5.878%; -5.836%]
  • 🟩 throughput [+9056284.140op/s; +9121071.529op/s] or [+6.199%; +6.243%]

scenario:datadog_sample_span/resource_pattern_rule_not_matching/wall_time

  • 🟩 execution_time [-6.957ns; -6.883ns] or [-4.157%; -4.113%]

scenario:ddsketch_encode/into_pb/clustered_near_zero

  • 🟩 execution_time [-8.169ns; -7.731ns] or [-19.231%; -18.200%]

scenario:ddsketch_encode/into_pb/collapsing

  • 🟩 execution_time [-8.569ns; -7.649ns] or [-18.601%; -16.604%]

scenario:ddsketch_encode/into_pb/large_values

  • 🟩 execution_time [-8.558ns; -8.008ns] or [-19.879%; -18.601%]

scenario:ddsketch_encode/into_pb/mixed

  • 🟩 execution_time [-8.476ns; -7.603ns] or [-19.255%; -17.272%]

scenario:glob_matcher/ascii_wildcard_question_match/wall_time

  • 🟩 execution_time [-22.654ns; -22.627ns] or [-38.101%; -38.055%]

scenario:glob_matcher/ascii_wildcard_star_match/wall_time

  • 🟩 execution_time [-23.746ns; -23.725ns] or [-39.234%; -39.199%]

scenario:profiler_attached/fast_path_system/4096

  • 🟥 execution_time [+7.087ns; +7.242ns] or [+7.238%; +7.396%]

scenario:profiler_attached/slow_path_system/4096

  • 🟩 execution_time [-13.184ns; -13.111ns] or [-8.351%; -8.305%]

scenario:trace_buffer/2_senders/no_delay

  • 🟥 execution_time [+53.889µs; +60.322µs] or [+6.189%; +6.928%]
  • 🟥 throughput [-134874.382op/s; -120426.006op/s] or [-6.522%; -5.823%]

scenario:trace_buffer/4_senders/no_delay

  • 🟩 execution_time [-207.038µs; -177.788µs] or [-8.464%; -7.268%]
  • 🟩 throughput [+117419.195op/s; +137498.466op/s] or [+7.974%; +9.338%]

Candidate

Omitted due to size.

Baseline

Omitted due to size.

Follow up of #2296.

Moves the HTTP & networking dependencies to `[workspace.dependencies]`:
`http`, `bytes`, `http-body-util`, `httpmock`, `reqwest`, `httparse`,
`mime`, `sha2`, `base64`, `percent-encoding`, `rustls-platform-verifier`,
`flate2`, `zstd`, `fastrand`, `once_cell` and `regex`. This is step 1 of
phase 5 of the workspace dependency migration plan.

All workspace entries are declared version-only with `default-features =
false`, and each leaf crate now opts into exactly the features it needs
(mostly `std`). Two documented exceptions where the no-default-features
build is unusable:

- `flate2` needs a compression backend; `rust_backend` (pure Rust, no C
  dependency) is the baseline.
- `httpmock` 0.8.0-alpha.1 does not compile with `default-features = false`:
  its own `readers.rs` calls `req.cookies()` unconditionally while that
  method is gated behind the `cookies` feature (upstream alpha bug).

Single source of truth per dependency version, no accidental skew, shorter
leaf-crate manifests.

- `Cargo.lock` only bumps `headers` 0.4.0 -> 0.4.1 and `sha1` 0.10.6 ->
  0.10.7 (transitive of httpmock's `cookies` feature).
- Dev-only duplicates (`serial_test`, `proptest`, `duplicate`,
  `pretty_assertions`) are left for a later step.

- `cargo check --workspace`
- `cargo nextest run` on the affected crates
- `cargo ffi-test`
@yannham
yannham force-pushed the yannham/workspace-deps-phase-4bis branch from ecc4a43 to 5b930a8 Compare September 2, 2026 08:22

@morrisonlevi morrisonlevi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved for profiling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants