Skip to content

chore(antithesis): Migrate Antithesis SDK to saluki-antithesis#1928

Open
blt wants to merge 1 commit into
mainfrom
blt/chore_antithesis_migrate_antithesis_sdk_to_saluki-antithesis
Open

chore(antithesis): Migrate Antithesis SDK to saluki-antithesis#1928
blt wants to merge 1 commit into
mainfrom
blt/chore_antithesis_migrate_antithesis_sdk_to_saluki-antithesis

Conversation

@blt

@blt blt commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

We've found the bare SDK use to be untidy. This commit attempts to
tidy up the use of the Antithesis SDK by hiding behind a macro which

  • takes care of the cfg flagging on/off
  • does not expose the need for serde_json
  • remains no-op

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

How did you test this PR?

References

@dd-octo-sts dd-octo-sts Bot added area/core Core functionality, event model, etc. area/io General I/O and networking. area/config Configuration. area/components Sources, transforms, and destinations. area/memory Memory bounds and memory management. source/dogstatsd DogStatsD source. transform/aggregate Aggregate transform. labels Jun 25, 2026

blt commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

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

This PR centralizes Antithesis instrumentation behind a new saluki-antithesis facade crate, replacing direct antithesis_sdk usage throughout the workspace and simplifying feature wiring so most crates no longer need their own antithesis feature.

Changes:

  • Added lib/saluki-antithesis with exported macros (always!, sometimes!, always_le!, etc.) that forward to antithesis_sdk when enabled and compile to no-ops otherwise.
  • Updated multiple crates to call saluki_antithesis::* macros and removed direct antithesis_sdk dependencies / per-crate antithesis feature plumbing.
  • Wired the workspace and agent-data-plane feature flags to enable Antithesis via saluki-antithesis/antithesis.

Reviewed changes

Copilot reviewed 28 out of 30 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/stringtheory/src/interning/map.rs Switches interner assertions to saluki_antithesis macros.
lib/stringtheory/Cargo.toml Drops antithesis_sdk optional dep/feature; adds saluki-antithesis.
lib/saluki-io/src/net/util/retry/queue/persisted.rs Replaces Antithesis assertions with facade macros; simplifies details handling.
lib/saluki-io/src/net/util/retry/queue/mod.rs Replaces overflow/invariant assertions with facade macros.
lib/saluki-io/src/net/util/retry/classifier/http.rs Switches non-retryable-status anchor assertion to facade macro.
lib/saluki-io/src/deser/codec/dogstatsd/mod.rs Replaces unreachable Antithesis assertion with facade macro.
lib/saluki-io/src/deser/codec/dogstatsd/helpers.rs Uses facade always! assertions around unchecked UTF-8 conversions.
lib/saluki-io/Cargo.toml Removes antithesis_sdk feature/dependency; adds saluki-antithesis.
lib/saluki-core/src/topology/interconnect/dispatcher.rs Switches discard-path anchor assertion to facade macro.
lib/saluki-core/src/pooling/fixed.rs Replaces semaphore-closed unreachable assertion with facade macro.
lib/saluki-core/src/pooling/elastic.rs Replaces semaphore-closed unreachable assertion with facade macro.
lib/saluki-core/Cargo.toml Removes per-crate antithesis feature/dependency; adds saluki-antithesis.
lib/saluki-context/src/resolver.rs Switches interner spill anchors to facade macros.
lib/saluki-context/Cargo.toml Removes per-crate antithesis feature/dependency; adds saluki-antithesis.
lib/saluki-config/src/lib.rs Migrates readiness assertions to facade macros; slightly refactors readiness branch.
lib/saluki-config/src/dynamic/watcher.rs Replaces lagged-broadcast unreachable assertion with facade macro.
lib/saluki-config/Cargo.toml Removes per-crate antithesis feature/dependency; adds saluki-antithesis.
lib/saluki-components/src/transforms/aggregate/mod.rs Migrates aggregation invariants/anchors to facade macros; adjusts assertion structure.
lib/saluki-components/src/sources/dogstatsd/replay/reader.rs Replaces trailer/corrupt-prefix assertion with facade macro.
lib/saluki-components/src/sources/dogstatsd/mod.rs Migrates dispatch-path assertions to facade macros.
lib/saluki-components/src/common/datadog/io.rs Replaces payload-forwarded anchor assertion with facade macro.
lib/saluki-components/Cargo.toml Removes per-crate antithesis feature/dependency; adds saluki-antithesis.
lib/saluki-antithesis/src/lib.rs New facade crate implementing feature-gated forwarding/no-op assertion macros and init().
lib/saluki-antithesis/Cargo.toml New crate manifest defining the shared antithesis feature and optional deps.
lib/ddsketch/src/agent/sketch.rs Migrates DDSketch invariants/anchors to facade macros.
lib/ddsketch/Cargo.toml Drops antithesis_sdk optional dep/feature; adds saluki-antithesis.
Cargo.toml Adds saluki-antithesis as a workspace member and workspace dependency.
Cargo.lock Updates dependency graph to route Antithesis SDK usage through saluki-antithesis.
bin/agent-data-plane/src/main.rs Uses facade reachable!/unreachable!/always_or_unreachable! macros; calls saluki_antithesis::init().
bin/agent-data-plane/Cargo.toml Rewires antithesis feature to saluki-antithesis/antithesis and removes direct antithesis_sdk dep.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/saluki-antithesis/src/lib.rs Outdated
Comment thread lib/saluki-components/src/transforms/aggregate/mod.rs
@pr-commenter

pr-commenter Bot commented Jun 25, 2026

Copy link
Copy Markdown

Binary Size Analysis (Agent Data Plane)

Baseline: da59d73 · Comparison: f4420b3 · diff
Analysis Configuration: stripped binaries · Pass/Fail Threshold: +5%
Sizes: 40.55 MiB (baseline) vs 40.55 MiB (comparison)
Size Change: +3.65 KiB (+0.01%)

✅ Binary size difference within threshold

Changes by Module
Module File Size Symbols
anon.a005ec511fda5f3c069eed6748f02e12.11.llvm.9079331708871912044 +16.70 KiB 1
anon.c631d4f28c2b2db28eff0b5e986a13c9.248.llvm.11665572444932606208 -16.70 KiB 1
figment +16.51 KiB 678
anon.1189445ec7eff1270e7dd0f17e2d5ca2.250.llvm.17306377180053584343 +13.82 KiB 1
anon.a9030c24ed0837a8b572f3c7e56188a8.26.llvm.9410433398480454732 -13.82 KiB 1
anon.037b73375b9db328fde26158632bc3f6.163.llvm.6585120399213736597 +8.68 KiB 1
anon.8b65035d13c51f32b9d728cce5f56d57.99.llvm.11465485835199057852 -8.68 KiB 1
core -8.00 KiB 15819
anon.a7a5ac420a821b949ace2821d7829b69.112.llvm.4013872591714255300 +7.77 KiB 1
anon.4c31535843da9b7b5c410466b0ae9c40.167.llvm.1741467634674709001 -7.77 KiB 1
saluki_io::net::util +7.76 KiB 183
anon.058104e7c5e17815cc397c51159e7bb6.17.llvm.5917434062816465002 +7.38 KiB 1
anon.c328b6f354cc1b1d6fbd54244a9fedaa.25.llvm.11162780902400196661 -7.29 KiB 1
serde -7.12 KiB 119
std -6.81 KiB 687
anon.261bb94b8d6de96de010fe9a3c608bbb.4.llvm.7628180700126258038 +6.72 KiB 1
anon.4ca187a8df3537fef265e620f4b32dbe.162.llvm.18445489589776564424 -6.72 KiB 1
[Unmapped] +6.42 KiB 1
tower -5.72 KiB 341
hashbrown +5.07 KiB 1471
Detailed Symbol Changes
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [NEW] +54.4Ki  [NEW] +54.3Ki    saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::ha9e4e51eec0304f6
  [NEW] +39.8Ki  [NEW] +39.7Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::h4d95df7d046da704
  [NEW] +39.5Ki  [NEW] +39.3Ki    _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::hc188f44480c77627
  [NEW] +33.8Ki  [NEW] +33.6Ki    _<saluki_components::transforms::aggregate::Aggregate as saluki_core::components::transforms::Transform>::run::_{{closure}}::had2e01dc3fa09af5
  [NEW] +30.4Ki  [NEW] +30.3Ki    agent_data_plane::cli::dogstatsd::handle_dogstatsd_command::_{{closure}}::h02653f5b83fc945f
  [NEW] +28.6Ki  [NEW] +28.5Ki    saluki_components::sources::otlp::metrics::translator::OtlpMetricsTranslator::translate_metrics::h562b182282594846
  [NEW] +25.4Ki  [NEW] +25.1Ki    _<saluki_components::sources::dogstatsd::_::<impl serde_core::de::Deserialize for saluki_components::sources::dogstatsd::DogStatsDConfiguration>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::h20277497ec1c98a7
  [NEW] +25.1Ki  [NEW] +24.9Ki    core::ptr::drop_in_place<agent_data_plane::cli::run::handle_run_command::{{closure}}>::h49a3ec78d95db62f
  [NEW] +24.7Ki  [NEW] +24.6Ki    saluki_components::sources::dogstatsd::drive_stream::_{{closure}}::h7afc200a0fa1e01e
  [NEW] +24.5Ki  [NEW] +24.3Ki    agent_data_plane::internal::remote_agent::run_remote_agent_registration_loop::_{{closure}}::ha578ddde22e2de13
  [NEW] +24.2Ki  [NEW] +24.0Ki    saluki_env::workload::collectors::containerd::NamespaceWatcher::build_initial_metadata_operations::_{{closure}}::h2f94705b93f853e1
  [DEL] -24.5Ki  [DEL] -24.3Ki    agent_data_plane::internal::remote_agent::run_remote_agent_registration_loop::_{{closure}}::hcf083b5830259c14
  [DEL] -25.0Ki  [DEL] -24.9Ki    saluki_components::sources::dogstatsd::drive_stream::_{{closure}}::h4618b6207a99eb2b
  [DEL] -25.1Ki  [DEL] -24.9Ki    core::ptr::drop_in_place<agent_data_plane::cli::run::handle_run_command::{{closure}}>::h9f679e5a6425f93c
  [DEL] -28.3Ki  [DEL] -28.2Ki    saluki_components::sources::otlp::metrics::translator::OtlpMetricsTranslator::translate_metrics::h6032372c5d685c9d
  [DEL] -30.4Ki  [DEL] -30.3Ki    agent_data_plane::cli::dogstatsd::handle_dogstatsd_command::_{{closure}}::hd47e947b534c018e
  [DEL] -33.7Ki  [DEL] -33.5Ki    _<saluki_components::transforms::aggregate::Aggregate as saluki_core::components::transforms::Transform>::run::_{{closure}}::hb4a84cbbc21a072f
  [DEL] -39.8Ki  [DEL] -39.7Ki    agent_data_plane::cli::run::handle_run_command::_{{closure}}::h772878347210b56d
  [DEL] -40.0Ki  [DEL] -39.8Ki    _<saluki_components::forwarders::otlp::OtlpForwarder as saluki_core::components::forwarders::Forwarder>::run::_{{closure}}::h622a7084ee8b9e54
  -0.2% -45.8Ki  -0.3% -51.4Ki    [56013 Others]
  [DEL] -54.3Ki  [DEL] -54.1Ki    saluki_components::common::datadog::io::run_endpoint_io_loop::_{{closure}}::h2c37bd2f0a7c3fc7
  +0.0% +3.65Ki  -0.0% -2.42Ki    TOTAL

@blt blt force-pushed the blt/chore_antithesis_migrate_antithesis_sdk_to_saluki-antithesis branch from 00d0656 to e8404b2 Compare June 25, 2026 19:16
@pr-commenter

pr-commenter Bot commented Jun 25, 2026

Copy link
Copy Markdown

Regression Detector (Agent Data Plane)

Run ID: 364623e9-2ddd-4bc8-907a-81daced1794b
Baseline: da59d73b · Comparison: f4420b32 · diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment (5)

Experiments configured erratic: true are tagged (ignored) and skipped when determining which experiments regressed or improved. Experiments which are detected as erratic at runtime are tagged (erratic) to flag that the run's sample dispersion was high, but their regression / improvement signal still counts.

experiment goal Δ mean % links
quality_gates_rss_dsd_low memory ⚪ +0.53 metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory ⚪ -0.02 metrics profiles logs
quality_gates_rss_dsd_heavy memory ⚪ -0.11 metrics profiles logs
quality_gates_rss_dsd_medium memory ⚪ -0.26 metrics profiles logs
quality_gates_rss_idle memory ⚪ -0.27 metrics profiles logs
Bounds Checks: ✅ Passed (5)
experiment check replicates observed links
quality_gates_rss_dsd_heavy memory_usage 10/10 ✅ 135 MiB ≤ 140 MiB metrics profiles logs
quality_gates_rss_dsd_low memory_usage 10/10 ✅ 42.5 MiB ≤ 50 MiB metrics profiles logs
quality_gates_rss_dsd_medium memory_usage 10/10 ✅ 64.8 MiB ≤ 75 MiB metrics profiles logs
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 ✅ 191 MiB ≤ 200 MiB metrics profiles logs
quality_gates_rss_idle memory_usage 10/10 ✅ 28.2 MiB ≤ 40 MiB metrics profiles logs
Explanation

A change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression (is_regression: true). Improvements use the matching criteria for the improving direction. Experiments configured erratic: true (tagged (ignored)) are skipped outright; experiments detected as erratic at runtime (tagged (erratic)) still count, since that flag describes sample dispersion rather than directional certainty. The Δ mean % cell is colored accordingly: 🟢 = improvement, 🔴 = regression, ⚪ = neutral. Reduction in CPU or memory is an improvement; reduction in ingress throughput is a regression.

We've found the bare SDK use to be untidy. This commit attempts to
tidy up the use of the Antithesis SDK by hiding behind a macro which

* takes care of the cfg flagging on/off
* does not expose the need for serde_json
* remains no-op
@blt blt force-pushed the blt/chore_antithesis_migrate_antithesis_sdk_to_saluki-antithesis branch from e8404b2 to f4420b3 Compare June 25, 2026 20:37
@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Jun 25, 2026

Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 2 Pipeline jobs failed

DataDog/saluki | unit-tests-macos-arm64   View in Datadog   GitLab

DataDog/saluki | unit-tests-miri-macos-arm64   View in Datadog   GitLab

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f4420b3 | Docs | Datadog PR Page | Give us feedback!

@blt blt marked this pull request as ready for review June 25, 2026 21:14
@blt blt requested a review from a team as a code owner June 25, 2026 21:14
blt added a commit that referenced this pull request Jun 25, 2026
This commit is a child to #1928. It's meant to demonstrate how the new
saluki-antithesis works in a bulk change and also, incidentally, flag
things to Antithesis that demonstrate bugs we've previously found.

See for instance PR #1923.
blt added a commit that referenced this pull request Jun 25, 2026
This commit is a child to #1928. It's meant to demonstrate how the new
saluki-antithesis works in a bulk change and also, incidentally, flag
things to Antithesis that demonstrate bugs we've previously found.

See for instance PR #1923.
@blt blt mentioned this pull request Jun 25, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/components Sources, transforms, and destinations. area/config Configuration. area/core Core functionality, event model, etc. area/io General I/O and networking. area/memory Memory bounds and memory management. source/dogstatsd DogStatsD source. transform/aggregate Aggregate transform.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants