refactor: migrate to workspace dependencies, phase 4 - #2296
Conversation
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 9b58363 | Docs | Datadog PR Page | Give us feedback! |
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
BenchmarksComparisonBenchmark execution time: 2026-07-30 15:24:05 Comparing candidate commit 9b58363 in PR branch Found 8 performance improvements and 24 performance regressions! Performance is the same for 110 metrics, 0 unstable metrics.
|
8477a40 to
7bda4b0
Compare
Move the dev/test and specialized tooling dependencies to workspace-level dependencies: tempfile, clap, criterion, bolero, allocator-api2, chrono, elf and cxx-build. Phase 4 of the workspace migration plan. Version decisions, resolving the pre-existing skew: - tempfile: 3.13 (the highest requirement already in the workspace) - clap: 4.3.21, criterion: 0.5.1, bolero: 0.13.4 - allocator-api2: 0.2.21, chrono: 0.4.38 Per the migration policy, workspace entries carry `default-features = false` and leaf crates opt into the features they need. criterion and tempfile declare a baseline feature set at the workspace level instead, because turning those defaults off would silently degrade behaviour rather than fail to compile: tempfile/getrandom (predictable temp file names without it), criterion/cargo_bench_support+plotters+rayon (`cargo bench` refuses to run without it). clap keeps `default-features = false` at the workspace level with no features listed there, since its default set (help, usage, color, error-context, suggestions) is exactly what the leaf crates want; each of the three clap consumers (tools, libdd-data-pipeline, datadog-profiling-replayer) sets `default-features = true` itself instead of duplicating that list. Cargo.lock only loses chrono's `wasmbind` edge (js-sys, wasm-bindgen), which datadog-sidecar was pulling in via implicit default features; that crate is not built for wasm32. No package is added or removed, so LICENSE-3rdparty.csv is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
9727c00 to
9b58363
Compare
…er-flare (#2332) # Release proposal for libdd-ffe, libdd-http-client, libdd-tracer-flare and their dependencies This PR contains version bumps based on public API changes and commits since last release. ## libdd-capabilities **Next version:** `3.0.0` **Semver bump:** `major` **Tag:** `libdd-capabilities-v3.0.0` ### Commits - fix(telemetry)!: stop sending Connection: close to the Agent (#2286) - feat(capabilities)!: Add streaming to http capabilities (#2251) - feat: added file capability [APMSP-3780] (#2240) - feat: added environment capability [APMSP-3780] (#2239) ## libdd-common **Next version:** `5.1.1` **Semver bump:** `patch` **Tag:** `libdd-common-v5.1.1` ### Commits - feat(telemetry)!: Add Installation signature and AppProduct changes payloads (#2213) - refactor: migrate to workspace dependencies, phase 4 (#2296) - refactor: migrate to workspace dependencies, phase 3 (#2283) - refactor: consolidate core dependencies at workspace level (phase 1) (#2253) - test: stabilize flaky tests (#2256) - fix(sidecar): don't double-encode file:// telemetry endpoints (#2230) - fix: last new clippy lint (#2221) ## libdd-tinybytes **Next version:** `1.1.2` **Semver bump:** `patch` **Tag:** `libdd-tinybytes-v1.1.2` ### Commits - chore: moving to workspace-level dependencies, phase 2 (#2270) - refactor: consolidate core dependencies at workspace level (phase 1) (#2253) ## libdd-trace-protobuf **Next version:** `4.0.1` **Semver bump:** `patch` **Tag:** `libdd-trace-protobuf-v4.0.1` ### Commits - refactor: migrate to workspace dependencies, phase 4 (#2296) - chore: moving to workspace-level dependencies, phase 2 (#2270) - refactor: consolidate core dependencies at workspace level (phase 1) (#2253) - feat(stats)!: implement additional metric tags in libdd-trace-stats (#2170) ## libdd-capabilities-impl **Next version:** `4.0.0` **Semver bump:** `major` **Tag:** `libdd-capabilities-impl-v4.0.0` ###⚠️ major bump forced due to: - `libdd-capabilities`: ^2.1.0 → ^3.0.0 ### Commits - feat(telemetry)!: Add Installation signature and AppProduct changes payloads (#2213) - refactor: migrate to workspace dependencies, phase 4 (#2296) - fix(telemetry)!: stop sending Connection: close to the Agent (#2286) - fix(remote-config)!: Expose HttpClientCapability in remote config (#2252) - feat(capabilities)!: Add streaming to http capabilities (#2251) - refactor: consolidate core dependencies at workspace level (phase 1) (#2253) - feat: added file capability [APMSP-3780] (#2240) - feat(telemetry)!: make telemetry worker wasm-compatible for the TraceExporter (#2172) - feat: added environment capability [APMSP-3780] (#2239) ## libdd-http-client **Next version:** `1.0.0` **Semver bump:** `major` **Tag:** `libdd-http-client-v1.0.0` **Warning:** this is an initial release. Please verify that the version and commits included are correct. ## libdd-trace-normalization **Next version:** `3.0.1` **Semver bump:** `patch` **Tag:** `libdd-trace-normalization-v3.0.1` ### Commits - refactor: migrate to workspace dependencies, phase 4 (#2296) - refactor: consolidate core dependencies at workspace level (phase 1) (#2253) ## libdd-remote-config **Next version:** `3.0.0` **Semver bump:** `major` **Tag:** `libdd-remote-config-v3.0.0` ### Commits - refactor(rc)!: make conversion from RemoteConfigProduct back and forth generally available (#2325) - fix(wasm)!: finish the WASM port of remote-config (#2315) - refactor: migrate to workspace dependencies, phase 3 (#2283) - feat(rc): Handle expired config status (#2274) - feat(remote-config)!: add AsmRawResponseBody capability (#2278) - chore: moving to workspace-level dependencies, phase 2 (#2270) - fix(remote-config)!: Expose HttpClientCapability in remote config (#2252) - refactor: consolidate core dependencies at workspace level (phase 1) (#2253) - fix(rc): Make Target fields available again after eaf5ad0 (#2232) - fix: new clippy lints (#2219) ## libdd-trace-utils **Next version:** `10.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-utils-v10.0.0` ###⚠️ major bump forced due to: - `libdd-capabilities`: ^2.1.0 → ^3.0.0 ### Commits - refactor(rc)!: make conversion from RemoteConfigProduct back and forth generally available (#2325) - fix(libdd-trace-utils): apply SpanLink flags masking when v0.5 json encoding (#2314) - refactor: migrate to workspace dependencies, phase 4 (#2296) - feat(data-pipeline)!: add compression option for agentless export (#2205) - refactor: migrate to workspace dependencies, phase 3 (#2283) - refactor(trace-utils)!: split generic TracerHeaderTags (#2279) - chore(lint): update nightly (#2281) - chore: moving to workspace-level dependencies, phase 2 (#2270) - fix(remote-config)!: Expose HttpClientCapability in remote config (#2252) - refactor: consolidate core dependencies at workspace level (phase 1) (#2253) - feat(stats)!: implement additional metric tags in libdd-trace-stats (#2170) - feat(trace-utils)!: add v1 decoder (#2174) - feat(trace-utils)!: add encoder v1 to v04 + refactor (#2145) - feat(otlp): add instrumentation scope metadata (#2235) - fix(trace-utils)!: serialize v0.5 span links and events into meta (#980) ## libdd-ffe **Next version:** `1.0.0` **Semver bump:** `major` **Tag:** `libdd-ffe-v1.0.0` **Warning:** this is an initial release. Please verify that the version and commits included are correct. ## libdd-tracer-flare **Next version:** `1.0.0` **Semver bump:** `major` **Tag:** `libdd-tracer-flare-v1.0.0` **Warning:** this is an initial release. Please verify that the version and commits included are correct. [APMSP-3780]: https://datadoghq.atlassian.net/browse/APMSP-3780?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [APMSP-3780]: https://datadoghq.atlassian.net/browse/APMSP-3780?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [APMSP-3780]: https://datadoghq.atlassian.net/browse/APMSP-3780?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: hoolioh <107922352+hoolioh@users.noreply.github.com>
Follow up of #2283.
What does this PR do?
Moves the dev/test and specialized tooling dependencies to
[workspace.dependencies]:tempfile,clap,criterion,bolero,allocator-api2,chrono,elfandcxx-build. This is phase 4 of the workspace dependency migration plan.Version decisions, resolving the pre-existing skew:
tempfile3,3.3,3.3.0,3.8,3.10,3.133.13clap4.0,4.3.214.3.21criterion0.5,0.5.10.5.1bolero0.13,0.13.40.13.4allocator-api20.2,0.2.210.2.21chrono0.4,0.4.31,0.4.380.4.38elf0.70.7cxx-build1.01.0For
tempfilenothing had to be downgraded, andlibdd-crashtrackerkeeps working on it.Motivation
Single source of truth per dependency version, no accidental skew, shorter leaf-crate manifests.
Additional Notes
Three documented deviations from the
default-features = falsepolicyThe policy says workspace entries must carry
default-features = falseand let leaf crates opt in. Three of these dependencies declare a baseline feature set at the workspace level instead, because dropping their defaults degrades behaviour silently rather than failing to compile — so the "compile and escalate only on failure" rule would have quietly regressed them:tempfile→getrandom. Without it tempfile seeds its temp-name RNG weakly, and its own docs flag that an attacker may then be able to predict the generated file names.criterion→default. Withoutcargo_bench_supportthe harness refuses to run under a plaincargo bench; the other two produce the report plots.Each is annotated with a comment in the root
Cargo.tomlexplaining why. This follows thelibcprecedent from phase 3.Behaviour changes worth a look
Cargo.lockloses exactly one thing: chrono'swasmbindedge (js-sys,wasm-bindgen).datadog-sidecarwas pulling it in via implicit default features (chrono = "0.4.31"); it is not built forwasm32, so this is dead weight. No package is added or removed, henceLICENSE-3rdparty.csvis unchanged (regenerated to confirm).elfneeded an explicitfeatures = ["std"]in both consumers — itsErrorimpl forParseErroris behindstd, whichanyhow::Contextrequires.libdd-trace-protobuf'sfuzzingfeature needed an explicitfeatures = ["std"]onbolero: theTypeGeneratorimpl forHashMaplives behindstd. Note this one is invisible to--all-features(feature unification across the workspace turnsbolero/stdon anyway) — it only shows up when checking that crate alone.How to test the change?
cargo check --workspace --exclude builder --all-targets, and again with--all-featurescargo build --workspace --exclude builder--all-featuresmasks:libdd-profiling-protobuf --features bolero,libdd-trace-protobuf --features fuzzing,libdd-alloc,libdd-otel-thread-ctx --features sanity-check,libdd-profiling-heap-sampler --features sanity-checkcargo check -p libdd-http-client --all-targets --no-default-features --features hyper-backend,https(alternative backend)cargo +nightly-2026-07-26 fmt --all -- --checkcargo +stable clippy --workspace --exclude builder --all-targets -- -D warnings, and again with--all-featurescargo nextest run --workspace --exclude builder --no-fail-fast -E '!test(tracing_integration_tests::)'— 2217/2221 passed; the 4 failures (3 crashtracker multi-thread tests hitting ptrace sandbox restrictions, 1 FFE fixture missing from disk) are pre-existing and identical to refactor: migrate to workspace dependencies, phase 3 #2283's baseline--all-features— 2297/2301, same 4 failurescargo nextest run -p libdd-crashtracker --features libdd-crashtracker/generate-unit-test-files— 148/148cargo test --workspace --exclude builder --doccargo ffi-test— 11/15 pass; theffe(missing fixture file) andprofile_intern(environment-specific buffer sizing) failures are pre-existing, same as refactor: migrate to workspace dependencies, phase 3 #2283./scripts/update_license_3rdparty.sh—LICENSE-3rdparty.csvunchangedcargo deny checkwas not run locally (cargo-deny isn't installed on this machine); since the resolved package set is byte-for-byte identical tomain, its verdict should be unchanged, and CI covers it.🤖 Generated with Claude Code