[SLES-2907] chore(deps): align libdatadog rev, dedupe libdd-* crates#1303
Draft
litianningdatadog wants to merge 1 commit into
Draft
Conversation
|
Follows up on the dd-trace-rs v0.5.0 bump: bumps the shared libdatadog
git rev (libdd-capabilities, libdd-common, libdd-trace-protobuf,
libdd-trace-utils, libdd-trace-normalization, libdd-trace-obfuscation,
libdd-trace-stats) from a820699 to 85ce322a, matching the exact
versions datadog-opentelemetry v0.5.0 pulls from crates.io. Adds a
[patch.crates-io] block redirecting those (and the other transitively
pulled libdd-* crates) to the same rev, collapsing what would
otherwise be two compiled copies of each.
This addresses the duplication Copilot flagged on
serverless-components#144 - see LIBDATADOG_VERSION_ALIGNMENT.md for
the full writeup of options considered and why this one (patch +
shared rev bump) was chosen over switching to crates.io versions
directly (tried first, reverted - broke type identity for
ReplaceRule/Endpoint/Span/etc. across the git-vs-registry boundary
throughout the trace pipeline) or leaving the duplication as-is.
Code changes forced by real upstream API changes at the new rev (not
duplication artifacts):
- src/traces/stats_concentrator_service.rs: SpanConcentrator::new
gained a cardinality-override and an obfuscation-config parameter
(both None - bottlecap doesn't use either); flush() now returns a
FlushResult{obfuscated_buckets, unobfuscated_buckets} split instead
of a flat Vec (combined both, since obfuscation is disabled).
- src/traces/trace_processor.rs, tests/apm_integration_test.rs:
pb::TracerPayload gained container_debug and pb::ClientGroupedStats
gained additional_metric_tags; added the missing fields to 3 struct
literals (2 in the integration test, which fails to compile without
the change).
Depends on DataDog/serverless-components#145 (which itself builds on
must stay in sync with whatever commit that PR lands at.
JIRA: https://datadoghq.atlassian.net/browse/SLES-2907
Verified: cargo build/test/clippy/fmt all clean against the real
serverless-components#145 commit (not a local override), 548/548
tests pass across all test binaries, cargo tree --duplicates shows
zero libdd-* duplicates, dd-rust-license-tool check passes.
b4123c4 to
08b3996
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Follows up on the
dd-trace-rsv0.5.0 bump(#1302):
bumps the shared
libdatadoggit rev (libdd-capabilities,libdd-common,libdd-trace-protobuf,libdd-trace-utils,libdd-trace-normalization,libdd-trace-obfuscation,libdd-trace-stats) froma820699to85ce322a,matching the exact versions
datadog-opentelemetryv0.5.0 pulls fromcrates.io. Adds a
[patch.crates-io]block redirecting those (and the othertransitively-pulled
libdd-*crates) to the same rev, collapsing what wouldotherwise be two compiled copies of each.
This addresses the duplication Copilot flagged on serverless-components#144 —
see
bottlecap/LIBDATADOG_VERSION_ALIGNMENT.mdfor the full writeup ofoptions considered and why this one (patch + shared rev bump) was chosen
over switching to crates.io versions directly (tried first, reverted — broke
type identity for
ReplaceRule/Endpoint/Span/etc. across thegit-vs-registry boundary throughout the trace pipeline) or leaving the
duplication as-is.
Why not just add this to #1302?
#1302 skipped this on purpose. The duplication only cost +256 bytes on the
release binary (LTO strips the unreachable copy), while actually fixing it
means an untested major-version bump across six libdatadog crates,
including
libdd-trace-obfuscation— the code that redacts sensitive datafrom spans. Not something to risk on the same PR as an urgent customer fix
(SLES-2907, B3 propagation errors). This PR does that bump on its own,
with its own tests.
Depends on DataDog/serverless-components#145
(which itself builds on #144, still draft) — the
dogstatsd/datadog-fips/datadog-agent-configrev pin here must stay in sync with whatever committhat PR lands at. Opened as draft for that reason.
JIRA: SLES-2907
Code changes forced by real upstream API changes at the new rev (not duplication artifacts)
src/traces/stats_concentrator_service.rs:SpanConcentrator::newgaineda cardinality-override and an obfuscation-config parameter (both
None—bottlecap doesn't use either);
flush()now returns aFlushResult{obfuscated_buckets, unobfuscated_buckets}split instead of aflat
Vec(combined both, since obfuscation is disabled).src/traces/trace_processor.rs,tests/apm_integration_test.rs:pb::TracerPayloadgainedcontainer_debugandpb::ClientGroupedStatsgained
additional_metric_tags; added the missing fields to 3 structliterals (2 of which are in the integration test, which fails to compile
without the change).
Testing
cargo build --all-targets— cleancargo test --all-targets— 548/548 pass across all test binariescargo clippy --all-targets -- -D warnings— cleancargo fmt --all -- --check— cleancargo tree --duplicates | grep ^libdd-— empty (zerolibdd-*duplicates)dd-rust-license-tool check— passesserverless-components#145commit (not a localfile://override used during earlier iteration)