From 421500697d7bf34b1f519f5df70319581d187657 Mon Sep 17 00:00:00 2001 From: Matt Klein Date: Tue, 26 Aug 2025 13:11:58 -0600 Subject: [PATCH 1/2] add a dedicated tester for drop processor configs Fixes BIT-6161 Signed-off-by: Matt Klein --- Cargo.lock | 273 ++++---- Cargo.toml | 9 +- pulse-drop-tester/Cargo.toml | 23 + pulse-drop-tester/README.md | 43 ++ pulse-drop-tester/src/lib.rs | 127 ++++ pulse-drop-tester/src/main.rs | 32 + pulse-drop-tester/src/test/mod.rs | 27 + .../src/pipeline/processor/drop/mod.rs | 16 +- pulse-metrics/src/pipeline/processor/mod.rs | 2 +- .../pulse/drop_tester/v1/drop_tester.proto | 45 ++ .../src/protos/pulse/drop_tester/mod.rs | 1 + .../pulse/drop_tester/v1/drop_tester.rs | 640 ++++++++++++++++++ .../src/protos/pulse/drop_tester/v1/mod.rs | 3 + pulse-protobuf/src/protos/pulse/mod.rs | 1 + 14 files changed, 1118 insertions(+), 124 deletions(-) create mode 100644 pulse-drop-tester/Cargo.toml create mode 100644 pulse-drop-tester/README.md create mode 100644 pulse-drop-tester/src/lib.rs create mode 100644 pulse-drop-tester/src/main.rs create mode 100644 pulse-drop-tester/src/test/mod.rs create mode 100644 pulse-protobuf/proto/pulse/drop_tester/v1/drop_tester.proto create mode 100644 pulse-protobuf/src/protos/pulse/drop_tester/mod.rs create mode 100644 pulse-protobuf/src/protos/pulse/drop_tester/v1/drop_tester.rs create mode 100644 pulse-protobuf/src/protos/pulse/drop_tester/v1/mod.rs diff --git a/Cargo.lock b/Cargo.lock index 23638b7..0d18f3f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -201,10 +201,12 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddb939d66e4ae03cee6091612804ba446b12878410cfa17f785f4dd67d4014e8" +checksum = "6448dfb3960f0b038e88c781ead1e7eb7929dfc3a71a1336ec9086c00f6d1e75" dependencies = [ + "compression-codecs", + "compression-core", "flate2", "futures-core", "memchr", @@ -359,9 +361,9 @@ dependencies = [ [[package]] name = "aws-sdk-sqs" -version = "1.81.0" +version = "1.82.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b17688adfe7471c885396c7f314736f349c425cb3536e8f80233ddebe64269cd" +checksum = "fe6858d5bd13b69709fe602f62e8a0be7f43ba0e71bfae1c65a638ffac5123e6" dependencies = [ "aws-credential-types", "aws-runtime", @@ -425,9 +427,9 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.83.0" +version = "1.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5468593c47efc31fdbe6c902d1a5fde8d9c82f78a3f8ccfe907b1e9434748cb" +checksum = "91abcdbfb48c38a0419eb75e0eac772a4783a96750392680e4f3c25a8a0535b9" dependencies = [ "aws-credential-types", "aws-runtime", @@ -830,9 +832,9 @@ checksum = "d27c3610c36aee21ce8ac510e6224498de4228ad772a171ed65643a24693a5a8" [[package]] name = "base62" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10e52a7bcb1d6beebee21fb5053af9e3cbb7a7ed1a4909e534040e676437ab1f" +checksum = "0104d4d8d15e458f21dcd027ea350bf38e4364954909402f4da075aca8d0f136" dependencies = [ "rustversion", ] @@ -865,27 +867,13 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" -[[package]] -name = "bd-bounded-buffer" -version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" -dependencies = [ - "ahash", - "bd-client-stats-store", - "bd-stats-common", - "log", - "thiserror 2.0.16", - "tokio", -] - [[package]] name = "bd-client-common" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "anyhow", "async-trait", - "bd-client-stats-store", "bd-log-primitives", "bd-metadata", "bd-proto", @@ -904,8 +892,10 @@ dependencies = [ [[package]] name = "bd-client-stats-store" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ + "anyhow", + "bd-client-common", "bd-proto", "bd-stats-common", "log", @@ -915,11 +905,27 @@ dependencies = [ "tokio", ] +[[package]] +name = "bd-error-reporter" +version = "1.0.0" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" +dependencies = [ + "anyhow", + "bd-client-common", + "bd-client-stats-store", + "bd-metadata", + "log", + "parking_lot", + "tokio", + "uuid", +] + [[package]] name = "bd-events" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ + "anyhow", "bd-runtime", "bd-shutdown", "log", @@ -929,7 +935,7 @@ dependencies = [ [[package]] name = "bd-grpc" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "anyhow", "assert_matches", @@ -970,10 +976,8 @@ dependencies = [ [[package]] name = "bd-grpc-codec" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ - "anyhow", - "bd-client-common", "bd-stats-common", "bytes", "flate2", @@ -985,7 +989,7 @@ dependencies = [ [[package]] name = "bd-key-value" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "anyhow", "base64 0.22.1", @@ -1000,7 +1004,7 @@ dependencies = [ [[package]] name = "bd-log" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "anyhow", "log", @@ -1016,7 +1020,7 @@ dependencies = [ [[package]] name = "bd-log-metadata" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "anyhow", "bd-log-primitives", @@ -1026,10 +1030,9 @@ dependencies = [ [[package]] name = "bd-log-primitives" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "ahash", - "bd-bounded-buffer", "bd-proto", "serde", "time", @@ -1038,12 +1041,12 @@ dependencies = [ [[package]] name = "bd-metadata" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" [[package]] name = "bd-panic" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "color-backtrace", "log", @@ -1053,7 +1056,7 @@ dependencies = [ [[package]] name = "bd-pgv" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "log", "protobuf 4.0.0-alpha.0", @@ -1064,7 +1067,7 @@ dependencies = [ [[package]] name = "bd-proto" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "bd-pgv", "bytes", @@ -1077,7 +1080,7 @@ dependencies = [ [[package]] name = "bd-proto-util" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "anyhow", "base64ct", @@ -1092,9 +1095,10 @@ dependencies = [ [[package]] name = "bd-resource-utilization" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "anyhow", + "bd-client-common", "bd-log-primitives", "bd-runtime", "bd-shutdown", @@ -1107,7 +1111,7 @@ dependencies = [ [[package]] name = "bd-runtime" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "anyhow", "async-trait", @@ -1124,7 +1128,7 @@ dependencies = [ [[package]] name = "bd-runtime-config" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "async-trait", "bd-server-stats", @@ -1142,7 +1146,7 @@ dependencies = [ [[package]] name = "bd-server-stats" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "anyhow", "bd-stats-common", @@ -1161,11 +1165,12 @@ dependencies = [ [[package]] name = "bd-session-replay" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "anyhow", "bd-client-common", "bd-client-stats-store", + "bd-error-reporter", "bd-log-primitives", "bd-runtime", "bd-shutdown", @@ -1180,7 +1185,7 @@ dependencies = [ [[package]] name = "bd-shutdown" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "log", "tokio", @@ -1189,15 +1194,16 @@ dependencies = [ [[package]] name = "bd-stats-common" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ + "anyhow", "sketches-rust", ] [[package]] name = "bd-test-helpers" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "anyhow", "assert_matches", @@ -1205,6 +1211,7 @@ dependencies = [ "axum 0.8.4", "axum-server", "bd-client-common", + "bd-error-reporter", "bd-events", "bd-grpc", "bd-grpc-codec", @@ -1238,7 +1245,7 @@ dependencies = [ [[package]] name = "bd-time" version = "1.0.0" -source = "git+https://github.com/bitdriftlabs/shared-core.git#6883b9e854cb95aeed3b6ae65257e08dce51f4fd" +source = "git+https://github.com/bitdriftlabs/shared-core.git#b10c06f4a217e4a50f90073d1f496ad2d547f6ec" dependencies = [ "async-trait", "parking_lot", @@ -1274,7 +1281,7 @@ version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", "cexpr", "clang-sys", "itertools 0.12.1", @@ -1314,9 +1321,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.2" +version = "2.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a65b545ab31d687cff52899d4890855fec459eb6afe0da6417b8a18da87aa29" +checksum = "34efbcccd345379ca2868b2b2c9d3782e9cc58ba87bc7d79d5b53d9c9ae6f25d" [[package]] name = "block-buffer" @@ -1390,9 +1397,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.33" +version = "1.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee0f8803222ba5a7e2777dd72ca451868909b1ac410621b676adf07280e9b5f" +checksum = "42bc4aea80032b7bf409b0bc7ccad88853858911b7713a8062fdc0623867bedc" dependencies = [ "jobserver", "libc", @@ -1545,9 +1552,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.45" +version = "4.5.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc0e74a703892159f5ae7d3aac52c8e6c392f5ae5f359c70b5881d60aaac318" +checksum = "2c5e4fcf9c21d2e544ca1ee9d8552de13019a42aa7dbf32747fa7aaf1df76e57" dependencies = [ "clap_builder", "clap_derive", @@ -1555,9 +1562,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.44" +version = "4.5.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e7f4214277f3c7aa526a59dd3fbe306a370daee1f8b7b8c987069cd8e888a8" +checksum = "fecb53a0e6fcfb055f686001bc2e2592fa527efaf38dbe81a6a9563562e57d41" dependencies = [ "anstream", "anstyle", @@ -1655,6 +1662,25 @@ dependencies = [ "sha1", ] +[[package]] +name = "compression-codecs" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46cc6539bf1c592cff488b9f253b30bc0ec50d15407c2cf45e27bd8f308d5905" +dependencies = [ + "compression-core", + "flate2", + "futures-core", + "memchr", + "pin-project-lite", +] + +[[package]] +name = "compression-core" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2957e823c15bde7ecf1e8b64e537aa03a6be5fda0e2334e99887669e75b12e01" + [[package]] name = "concat-string" version = "1.0.1" @@ -1850,7 +1876,7 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", "crossterm_winapi", "parking_lot", "rustix 0.38.44", @@ -2093,9 +2119,9 @@ dependencies = [ [[package]] name = "dns-lookup" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91adf1f5ae09290d87cca8f4f0a8e49bcc30672993eb8aa11a5c9d8872d16a98" +checksum = "cf5597a4b7fe5275fc9dcf88ce26326bc8e4cb87d0130f33752d4c5f717793cf" dependencies = [ "cfg-if", "libc", @@ -2285,8 +2311,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e24cb5a94bcae1e5408b0effca5cd7172ea3c5755049c5f3af4cd283a165298" dependencies = [ "bit-set", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", + "regex-automata 0.4.10", + "regex-syntax 0.8.6", ] [[package]] @@ -2307,7 +2333,7 @@ version = "25.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1045398c1bfd89168b5fd3f1fc11f6e70b34f6f66300c87d44d3de849463abf1" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", "rustc_version 0.4.1", ] @@ -2563,7 +2589,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2deb07a133b1520dc1a5690e9bd08950108873d7ed5de38dcc74d3b5ebffa110" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", "libc", "libgit2-sys", "log", @@ -2610,7 +2636,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.10.0", + "indexmap 2.11.0", "slab", "tokio", "tokio-util", @@ -2629,7 +2655,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.3.1", - "indexmap 2.10.0", + "indexmap 2.11.0", "slab", "tokio", "tokio-util", @@ -3133,9 +3159,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9" dependencies = [ "equivalent", "hashbrown 0.15.5", @@ -3166,7 +3192,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", "inotify-sys", "libc", ] @@ -3210,11 +3236,11 @@ dependencies = [ [[package]] name = "io-uring" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", "cfg-if", "libc", ] @@ -3276,9 +3302,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jobserver" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ "getrandom 0.3.3", "libc", @@ -3493,7 +3519,7 @@ dependencies = [ "lalrpop-util", "petgraph", "regex", - "regex-syntax 0.8.5", + "regex-syntax 0.8.6", "sha3", "string_cache", "term", @@ -3507,7 +3533,7 @@ version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5baa5e9ff84f1aefd264e6869907646538a52147a755d494517a8007fb48733" dependencies = [ - "regex-automata 0.4.9", + "regex-automata 0.4.10", "rustversion", ] @@ -3804,7 +3830,7 @@ version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", "fsevent-sys", "inotify", "kqueue", @@ -3956,7 +3982,7 @@ version = "6.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "336b9c63443aceef14bea841b899035ae3abe89b7c486aaf4c5bd8aafedac3f0" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", "libc", "once_cell", "onig_sys", @@ -4134,7 +4160,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ "fixedbitset", - "indexmap 2.10.0", + "indexmap 2.11.0", ] [[package]] @@ -4367,7 +4393,7 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc5b72d8145275d844d4b5f6d4e1eef00c8cd889edb6035c21675d1bb1f45c9f" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", "hex", "procfs-core", "rustix 0.38.44", @@ -4379,7 +4405,7 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "239df02d8349b06fc07398a3a1697b06418223b1c7725085e801e7c0fc6a12ec" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", "hex", ] @@ -4406,7 +4432,7 @@ version = "0.1.0" source = "git+https://github.com/bitdriftlabs/mpl-core#b353f0f7298b4ab77271bcaf67435cdd3ba36bd8" dependencies = [ "bytes", - "indexmap 2.10.0", + "indexmap 2.11.0", "nom 7.1.3", "num_enum 0.7.4", "protobuf 4.0.0-alpha.0", @@ -4509,7 +4535,7 @@ version = "4.0.0-alpha.0" source = "git+https://github.com/bitdriftlabs/rust-protobuf.git?branch=patch-stack#4d5c5822ad96089057c438616a943aadf6f613ac" dependencies = [ "anyhow", - "indexmap 2.10.0", + "indexmap 2.11.0", "log", "protobuf 4.0.0-alpha.0", "protobuf-support 4.0.0-alpha.0", @@ -4537,9 +4563,9 @@ dependencies = [ [[package]] name = "psl" -version = "2.1.135" +version = "2.1.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4352cc3606316be99b323c2868fdf21c25982592c2ac315e68ed1b61757221a" +checksum = "0a4d5ec1bed313b61a9d525e8549493538aea497056a5484f5398b1a05bb8261" dependencies = [ "psl-types", ] @@ -4601,6 +4627,24 @@ dependencies = [ "vrl", ] +[[package]] +name = "pulse-drop-tester" +version = "1.0.0" +dependencies = [ + "anyhow", + "bd-log", + "bd-server-stats", + "clap", + "ctor", + "log", + "pretty_assertions", + "protobuf 4.0.0-alpha.0", + "pulse-common", + "pulse-metrics", + "pulse-protobuf", + "vrl", +] + [[package]] name = "pulse-metrics" version = "1.0.0" @@ -5039,19 +5083,19 @@ version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", ] [[package]] name = "regex" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", + "regex-automata 0.4.10", + "regex-syntax 0.8.6", ] [[package]] @@ -5065,13 +5109,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax 0.8.6", ] [[package]] @@ -5081,18 +5125,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c11639076bf147be211b90e47790db89f4c22b6c8a9ca6e960833869da67166" dependencies = [ "aho-corasick", - "indexmap 2.10.0", + "indexmap 2.11.0", "itertools 0.13.0", "nohash", "regex", - "regex-syntax 0.8.5", + "regex-syntax 0.8.6", ] [[package]] name = "regex-lite" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" +checksum = "943f41321c63ef1c92fd763bfe054d2668f7f225a5c29f0105903dc2fc04ba30" [[package]] name = "regex-syntax" @@ -5102,9 +5146,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "reqwest" @@ -5225,7 +5269,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", "errno", "libc", "linux-raw-sys 0.4.15", @@ -5238,7 +5282,7 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", "errno", "libc", "linux-raw-sys 0.9.4", @@ -5466,7 +5510,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -5479,7 +5523,7 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80fb1d92c5028aa318b4b8bd7302a5bfcf48be96a37fc6fc790f806b0004ee0c" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -5601,7 +5645,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.10.0", + "indexmap 2.11.0", "itoa", "ryu", "serde", @@ -6158,7 +6202,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.10.0", + "indexmap 2.11.0", "toml_datetime", "winnow 0.5.40", ] @@ -6169,9 +6213,9 @@ version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.10.0", + "indexmap 2.11.0", "toml_datetime", - "winnow 0.7.12", + "winnow 0.7.13", ] [[package]] @@ -6265,7 +6309,7 @@ checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ "async-compression", "base64 0.22.1", - "bitflags 2.9.2", + "bitflags 2.9.3", "bytes", "futures-core", "futures-util", @@ -6461,13 +6505,14 @@ checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" [[package]] name = "url" -version = "2.5.6" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "137a3c834eaf7139b73688502f3f1141a0337c5d8e4d9b536f9b8c796e26a7c4" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] @@ -6570,7 +6615,7 @@ dependencies = [ "hostname", "iana-time-zone", "idna", - "indexmap 2.10.0", + "indexmap 2.11.0", "indoc", "influxdb-line-protocol", "itertools 0.14.0", @@ -7098,9 +7143,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] @@ -7111,7 +7156,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.3", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 7a44ea2..a543bfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ [workspace] members = [ "pulse-common", + "pulse-drop-tester", "pulse-metrics", "pulse-promcli", "pulse-promloadgen", @@ -17,7 +18,7 @@ assert_matches = "1.5.0" async-trait = "0.1" aws-config = "1.8.5" aws-credential-types = "1.2.5" -aws-sdk-sqs = "1.81.0" +aws-sdk-sqs = "1.82.1" aws-sigv4 = "1.3.4" aws-smithy-async = "1.2.5" aws-smithy-http = "0.62.3" @@ -40,8 +41,8 @@ bd-test-helpers = { git = "https://github.com/bitdriftlabs/shared-core.gi bd-time = { git = "https://github.com/bitdriftlabs/shared-core.git" } built = { version = "0.8", features = ["git2"] } bytes = "1" -cc = "1.2.33" -clap = { version = "4.5.45", features = ["derive", "env"] } +cc = "1.2.34" +clap = { version = "4.5.46", features = ["derive", "env"] } comfy-table = "7.1.4" console-subscriber = "0.4.1" criterion = { version = "0.7", features = ["html_reports"] } @@ -129,7 +130,7 @@ topk = "0.5.0" topological-sort = "0.2.2" tracing = "0.1.41" unwrap-infallible = "0.1.5" -url = "2.5.6" +url = "2.5.7" uuid = { version = "1.18.0", features = ["v4"] } vrl = { git = "https://github.com/mattklein123/vrl.git", branch = "performance-20250625", default-features = false, features = [ diff --git a/pulse-drop-tester/Cargo.toml b/pulse-drop-tester/Cargo.toml new file mode 100644 index 0000000..44f3745 --- /dev/null +++ b/pulse-drop-tester/Cargo.toml @@ -0,0 +1,23 @@ +[package] +edition = "2024" +license-file = "../LICENSE" +name = "pulse-drop-tester" +publish = false +version = "1.0.0" + +[lib] +doctest = false + +[dependencies] +anyhow.workspace = true +bd-log.workspace = true +bd-server-stats.workspace = true +clap.workspace = true +ctor.workspace = true +log.workspace = true +pretty_assertions.workspace = true +protobuf.workspace = true +pulse-common = { path = "../pulse-common" } +pulse-metrics = { path = "../pulse-metrics" } +pulse-protobuf = { path = "../pulse-protobuf" } +vrl.workspace = true diff --git a/pulse-drop-tester/README.md b/pulse-drop-tester/README.md new file mode 100644 index 0000000..e138613 --- /dev/null +++ b/pulse-drop-tester/README.md @@ -0,0 +1,43 @@ +# Drop tester + +The drop tester binary (build via `cargo build --bin pulse-drop-tester`) is used to run self +contained tests. + +The configuration for the tests is defined in Protobuf and passed to the tool as YAML. See here for +the [configuration definition](../pulse-protobuf/proto/pulse/drop_tester/v1/drop_tester.proto). The +binary is invoked with the following options: + +``` +Usage: pulse-drop-tester [OPTIONS] --config + +Options: + -c, --config + --proxy-config + -h, --help Print help +``` + +The `-c` option is based the test config. Optionally `--proxy-config` can be used to pass a proxy +configuration to load drop processor configs from. This makes it easier to keep the real +configuration and the test cases in sync. + +An example test file look as follows: + +```yaml +test_cases: +- config: + rules: + - name: foo + conditions: + - metric_name: + exact: bar + metrics: + - input: bar:1|c + dropped_by: foo + - input: baz:1|g +``` + +The `dropped_by` test case specifies which rule name should drop the metric. If the metric should +not be dropped just leave it empty/missing. + +Currently all input and output metrics are specified in DogStatsD format, even though internally +Prometheus style metrics will work just fine. In the future we will support both formats in tests. diff --git a/pulse-drop-tester/src/lib.rs b/pulse-drop-tester/src/lib.rs new file mode 100644 index 0000000..3e2cdc6 --- /dev/null +++ b/pulse-drop-tester/src/lib.rs @@ -0,0 +1,127 @@ +// pulse - bitdrift's observability proxy +// Copyright Bitdrift, Inc. All rights reserved. +// +// Use of this source code is governed by a source available license that can be found in the +// LICENSE file or at: +// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt + +#[cfg(test)] +mod test; + +use anyhow::{anyhow, bail}; +use bd_server_stats::stats::Collector; +use config::bootstrap::v1::bootstrap::Config; +use config::processor::v1::processor::processor_config::Processor_type; +use protobuf::Message; +use pulse_common::proto::yaml_to_proto; +use pulse_metrics::pipeline::processor::drop::TranslatedDropConfig; +use pulse_metrics::protos::metric::{DownstreamId, MetricSource, ParsedMetric}; +use pulse_metrics::protos::statsd; +use pulse_protobuf::protos::pulse::config; +use pulse_protobuf::protos::pulse::config::common::v1::common::wire_protocol::StatsD; +use pulse_protobuf::protos::pulse::config::processor::v1::drop::DropConfig; +use pulse_protobuf::protos::pulse::config::processor::v1::drop::drop_processor_config::Config_source; +use pulse_protobuf::protos::pulse::config::processor::v1::processor::ProcessorConfig; +use pulse_protobuf::protos::pulse::drop_tester::v1::drop_tester::drop_test_case::Config_type; +use pulse_protobuf::protos::pulse::drop_tester::v1::drop_tester::{DropTestCase, DropTesterConfig}; +use std::time::Instant; + +#[ctor::ctor] +fn global_init() { + bd_log::SwapLogger::initialize(); +} + +fn run_test_case(test_case: DropTestCase, proxy_config: Option<&Config>) -> anyhow::Result { + fn extract_from_config( + field_name: &str, + proxy_config: Option<&Config>, + processor_name: &str, + extract: impl Fn(&ProcessorConfig) -> Option, + ) -> anyhow::Result { + let Some(config) = proxy_config else { + bail!("{field_name} requires passing a proxy config via --proxy-config"); + }; + config + .pipeline() + .processors + .iter() + .find_map(|(name, value)| { + if name.as_str() == processor_name { + return extract(value); + } + None + }) + .ok_or_else(|| anyhow!("no processor named '{processor_name} found in proxy config")) + } + + let drop_config: DropConfig = match test_case.config_type.as_ref().expect("pgv") { + Config_type::Config(config) => Ok(config.clone()), + Config_type::DropProcessorName(processor_name) => extract_from_config( + "mutate_processor_name", + proxy_config, + processor_name, + |value| { + if let Some(Processor_type::Drop(drop)) = &value.processor_type { + return Some(match drop.config_source.as_ref().expect("pgv") { + Config_source::Inline(config) => config.clone(), + Config_source::FileSource(_) => { + // TODO(mattklein123): Support file source if needed. + return None; + }, + }); + } + + None + }, + ), + }?; + + let drop_config = TranslatedDropConfig::new(&drop_config, &Collector::default().scope("test"))?; + + let mut num_metrics = 0; + for metric in test_case.metrics { + num_metrics += 1; + + // TODO(mattklein123): Support parsing other formats. Probably a limited PromQL query of the + // metric? + let mut input = statsd::parse( + &metric.input.clone().into_bytes(), + StatsD::default_instance(), + ) + .map_err(|e| anyhow!("unable to parse input '{}' as statsd: {e}", metric.input))?; + log::debug!("parsed input metric: {input}"); + input.timestamp = 0; + let parsed_input = ParsedMetric::new( + input, + MetricSource::PromRemoteWrite, + Instant::now(), + DownstreamId::LocalOrigin, + ); + + let dropped_by = drop_config.drop_sample(&parsed_input).unwrap_or(""); + if metric.dropped_by.as_str() != dropped_by { + bail!( + "expected metric '{}' to be dropped by '{}' but actually dropped by '{}'", + metric.input, + metric.dropped_by, + dropped_by + ); + } + } + + Ok(num_metrics) +} + +pub fn run(config: &str, proxy_config: Option<&str>) -> anyhow::Result<()> { + let config: DropTesterConfig = yaml_to_proto(config)?; + let proxy_config: Option = proxy_config.map(yaml_to_proto).transpose()?; + + let num_test_cases = config.test_cases.len(); + let mut num_metrics = 0; + for test_case in config.test_cases { + num_metrics += run_test_case(test_case, proxy_config.as_ref())?; + } + log::info!("processed {num_test_cases} test case(s) and {num_metrics} test metrics(s)"); + + Ok(()) +} diff --git a/pulse-drop-tester/src/main.rs b/pulse-drop-tester/src/main.rs new file mode 100644 index 0000000..2f40c70 --- /dev/null +++ b/pulse-drop-tester/src/main.rs @@ -0,0 +1,32 @@ +// pulse - bitdrift's observability proxy +// Copyright Bitdrift, Inc. All rights reserved. +// +// Use of this source code is governed by a source available license that can be found in the +// LICENSE file or at: +// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt + +use clap::Parser; +use pulse_drop_tester::run; + +#[derive(Parser)] +struct Options { + #[arg(short = 'c', long = "config")] + pub config: String, + + #[arg(long = "proxy-config")] + pub proxy_config: Option, +} + +fn main() -> anyhow::Result<()> { + let options = Options::parse(); + log::info!("loading test config from: {}", options.config); + let config = std::fs::read_to_string(options.config)?; + let proxy_config = options + .proxy_config + .map(|proxy_config| { + log::info!("loading proxy config from: {proxy_config}"); + std::fs::read_to_string(proxy_config) + }) + .transpose()?; + run(&config, proxy_config.as_deref()) +} diff --git a/pulse-drop-tester/src/test/mod.rs b/pulse-drop-tester/src/test/mod.rs new file mode 100644 index 0000000..d152a26 --- /dev/null +++ b/pulse-drop-tester/src/test/mod.rs @@ -0,0 +1,27 @@ +// pulse - bitdrift's observability proxy +// Copyright Bitdrift, Inc. All rights reserved. +// +// Use of this source code is governed by a source available license that can be found in the +// LICENSE file or at: +// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt + +use crate::run; + +#[test] +fn basic_case() { + let config = r" +test_cases: +- config: + rules: + - name: foo + conditions: + - metric_name: + exact: bar + metrics: + - input: bar:1|c + dropped_by: foo + - input: baz:1|g + "; + + run(config, None).unwrap(); +} diff --git a/pulse-metrics/src/pipeline/processor/drop/mod.rs b/pulse-metrics/src/pipeline/processor/drop/mod.rs index a506512..3a308b6 100644 --- a/pulse-metrics/src/pipeline/processor/drop/mod.rs +++ b/pulse-metrics/src/pipeline/processor/drop/mod.rs @@ -186,12 +186,12 @@ impl TranslatedDropRule { // TranslatedDropConfig // -struct TranslatedDropConfig { +pub struct TranslatedDropConfig { rules: Vec, } impl TranslatedDropConfig { - fn new(config: &DropConfig, scope: &Scope) -> anyhow::Result { + pub fn new(config: &DropConfig, scope: &Scope) -> anyhow::Result { let rules = config .rules .iter() @@ -201,8 +201,14 @@ impl TranslatedDropConfig { Ok(Self { rules }) } - fn drop_sample(&self, sample: &ParsedMetric) -> bool { - self.rules.iter().any(|rule| rule.drop_sample(sample)) + pub fn drop_sample(&self, sample: &ParsedMetric) -> Option<&str> { + self.rules.iter().find_map(|rule| { + if rule.drop_sample(sample) { + Some(rule.name.as_str()) + } else { + None + } + }) } } @@ -279,7 +285,7 @@ impl PipelineProcessor for DropProcessor { let config = self.current_config.read(); samples .into_iter() - .filter(|sample| !config.drop_sample(sample)) + .filter(|sample| config.drop_sample(sample).is_none()) .collect() }; log::debug!("forwarding {} sample(s)", samples.len()); diff --git a/pulse-metrics/src/pipeline/processor/mod.rs b/pulse-metrics/src/pipeline/processor/mod.rs index f50d13b..77fcbf8 100644 --- a/pulse-metrics/src/pipeline/processor/mod.rs +++ b/pulse-metrics/src/pipeline/processor/mod.rs @@ -37,7 +37,7 @@ mod aggregation; mod buffer; mod cardinality_limiter; mod cardinality_tracker; -mod drop; +pub mod drop; pub mod elision; mod internode; mod mutate; diff --git a/pulse-protobuf/proto/pulse/drop_tester/v1/drop_tester.proto b/pulse-protobuf/proto/pulse/drop_tester/v1/drop_tester.proto new file mode 100644 index 0000000..855660b --- /dev/null +++ b/pulse-protobuf/proto/pulse/drop_tester/v1/drop_tester.proto @@ -0,0 +1,45 @@ +// pulse - bitdrift's observability proxy +// Copyright Bitdrift, Inc. All rights reserved. +// +// Use of this source code is governed by a source available license that can be found in the +// LICENSE file or at: +// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt + +syntax = "proto3"; +package pulse.drop_tester.v1; + +import "pulse/config/processor/v1/drop.proto"; +import "validate/validate.proto"; + +// A metric transform to test in a given test context. +message MetricDropTest { + // The input metric. Currently this string must be specified in statsd format. For example: + // foo:1|c|#foo:bar + string input = 1 [(validate.rules).string = {min_len: 1}]; + + // The expected rule name that drops the metric. If the metric is not meant to be dropped, this + // field should be left empty. + string dropped_by = 2; +} + +// An individual test case, composed of a drop config and a number of test transforms to perform. +message DropTestCase { + oneof config_type { + option (validate.required) = true; + + // The drop config to test against. + config.processor.v1.DropConfig config = 1 [(validate.rules).string = {min_len: 1}]; + + // The name of the drop processor in the supplied proxy config to load the program from. + string drop_processor_name = 2 [(validate.rules).string = {min_len: 1}]; + } + + // 1 or more metrics that will be tested against the above parameters. + repeated MetricDropTest metrics = 3 [(validate.rules).repeated .min_items = 1]; +} + +// Root configuration for a test run. Each test run is composed of 1 or more test cases. +message DropTesterConfig { + // The test cases in the test run. + repeated DropTestCase test_cases = 1 [(validate.rules).repeated .min_items = 1]; +} diff --git a/pulse-protobuf/src/protos/pulse/drop_tester/mod.rs b/pulse-protobuf/src/protos/pulse/drop_tester/mod.rs new file mode 100644 index 0000000..a3a6d96 --- /dev/null +++ b/pulse-protobuf/src/protos/pulse/drop_tester/mod.rs @@ -0,0 +1 @@ +pub mod v1; diff --git a/pulse-protobuf/src/protos/pulse/drop_tester/v1/drop_tester.rs b/pulse-protobuf/src/protos/pulse/drop_tester/v1/drop_tester.rs new file mode 100644 index 0000000..871f422 --- /dev/null +++ b/pulse-protobuf/src/protos/pulse/drop_tester/v1/drop_tester.rs @@ -0,0 +1,640 @@ +// proto - bitdrift's client/server API definitions +// Copyright Bitdrift, Inc. All rights reserved. +// +// Use of this source code and APIs are governed by a source available license that can be found in +// the LICENSE file or at: +// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt + +// This file is generated by rust-protobuf 4.0.0-alpha.0. Do not edit +// .proto file is parsed by protoc 32.0 +// @generated + +// https://github.com/rust-lang/rust-clippy/issues/702 +#![allow(unknown_lints)] +#![allow(clippy::all)] + +#![allow(unused_attributes)] +#![cfg_attr(rustfmt, rustfmt::skip)] + +#![allow(dead_code)] +#![allow(missing_docs)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] +#![allow(non_upper_case_globals)] +#![allow(trivial_casts)] +#![allow(unused_results)] +#![allow(unused_mut)] + +//! Generated file from `pulse/drop_tester/v1/drop_tester.proto` + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_4_0_0_ALPHA_0; + +// @@protoc_insertion_point(message:pulse.drop_tester.v1.MetricDropTest) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct MetricDropTest { + // message fields + // @@protoc_insertion_point(field:pulse.drop_tester.v1.MetricDropTest.input) + pub input: ::protobuf::Chars, + // @@protoc_insertion_point(field:pulse.drop_tester.v1.MetricDropTest.dropped_by) + pub dropped_by: ::protobuf::Chars, + // special fields + // @@protoc_insertion_point(special_field:pulse.drop_tester.v1.MetricDropTest.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a MetricDropTest { + fn default() -> &'a MetricDropTest { + ::default_instance() + } +} + +impl MetricDropTest { + pub fn new() -> MetricDropTest { + ::std::default::Default::default() + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(2); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "input", + |m: &MetricDropTest| { &m.input }, + |m: &mut MetricDropTest| { &mut m.input }, + )); + fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( + "dropped_by", + |m: &MetricDropTest| { &m.dropped_by }, + |m: &mut MetricDropTest| { &mut m.dropped_by }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "MetricDropTest", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for MetricDropTest { + const NAME: &'static str = "MetricDropTest"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.input = is.read_tokio_chars()?; + }, + 18 => { + self.dropped_by = is.read_tokio_chars()?; + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + if !self.input.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.input); + } + if !self.dropped_by.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.dropped_by); + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + if !self.input.is_empty() { + os.write_string(1, &self.input)?; + } + if !self.dropped_by.is_empty() { + os.write_string(2, &self.dropped_by)?; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> MetricDropTest { + MetricDropTest::new() + } + + fn clear(&mut self) { + self.input.clear(); + self.dropped_by.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static MetricDropTest { + static instance: MetricDropTest = MetricDropTest { + input: ::protobuf::Chars::new(), + dropped_by: ::protobuf::Chars::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for MetricDropTest { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("MetricDropTest").unwrap()).clone() + } +} + +impl ::std::fmt::Display for MetricDropTest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for MetricDropTest { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +// @@protoc_insertion_point(message:pulse.drop_tester.v1.DropTestCase) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct DropTestCase { + // message fields + // @@protoc_insertion_point(field:pulse.drop_tester.v1.DropTestCase.metrics) + pub metrics: ::std::vec::Vec, + // message oneof groups + pub config_type: ::std::option::Option, + // special fields + // @@protoc_insertion_point(special_field:pulse.drop_tester.v1.DropTestCase.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a DropTestCase { + fn default() -> &'a DropTestCase { + ::default_instance() + } +} + +impl DropTestCase { + pub fn new() -> DropTestCase { + ::std::default::Default::default() + } + + // .pulse.config.processor.v1.DropConfig config = 1; + + pub fn config(&self) -> &super::drop::DropConfig { + match self.config_type { + ::std::option::Option::Some(drop_test_case::Config_type::Config(ref v)) => v, + _ => ::default_instance(), + } + } + + pub fn clear_config(&mut self) { + self.config_type = ::std::option::Option::None; + } + + pub fn has_config(&self) -> bool { + match self.config_type { + ::std::option::Option::Some(drop_test_case::Config_type::Config(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_config(&mut self, v: super::drop::DropConfig) { + self.config_type = ::std::option::Option::Some(drop_test_case::Config_type::Config(v)) + } + + // Mutable pointer to the field. + pub fn mut_config(&mut self) -> &mut super::drop::DropConfig { + if let ::std::option::Option::Some(drop_test_case::Config_type::Config(_)) = self.config_type { + } else { + self.config_type = ::std::option::Option::Some(drop_test_case::Config_type::Config(super::drop::DropConfig::new())); + } + match self.config_type { + ::std::option::Option::Some(drop_test_case::Config_type::Config(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_config(&mut self) -> super::drop::DropConfig { + if self.has_config() { + match self.config_type.take() { + ::std::option::Option::Some(drop_test_case::Config_type::Config(v)) => v, + _ => panic!(), + } + } else { + super::drop::DropConfig::new() + } + } + + // string drop_processor_name = 2; + + pub fn drop_processor_name(&self) -> &str { + match self.config_type { + ::std::option::Option::Some(drop_test_case::Config_type::DropProcessorName(ref v)) => v, + _ => "", + } + } + + pub fn clear_drop_processor_name(&mut self) { + self.config_type = ::std::option::Option::None; + } + + pub fn has_drop_processor_name(&self) -> bool { + match self.config_type { + ::std::option::Option::Some(drop_test_case::Config_type::DropProcessorName(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_drop_processor_name(&mut self, v: ::protobuf::Chars) { + self.config_type = ::std::option::Option::Some(drop_test_case::Config_type::DropProcessorName(v)) + } + + // Mutable pointer to the field. + pub fn mut_drop_processor_name(&mut self) -> &mut ::protobuf::Chars { + if let ::std::option::Option::Some(drop_test_case::Config_type::DropProcessorName(_)) = self.config_type { + } else { + self.config_type = ::std::option::Option::Some(drop_test_case::Config_type::DropProcessorName(::protobuf::Chars::new())); + } + match self.config_type { + ::std::option::Option::Some(drop_test_case::Config_type::DropProcessorName(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_drop_processor_name(&mut self) -> ::protobuf::Chars { + if self.has_drop_processor_name() { + match self.config_type.take() { + ::std::option::Option::Some(drop_test_case::Config_type::DropProcessorName(v)) => v, + _ => panic!(), + } + } else { + ::protobuf::Chars::new() + } + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(3); + let mut oneofs = ::std::vec::Vec::with_capacity(1); + fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, super::drop::DropConfig>( + "config", + DropTestCase::has_config, + DropTestCase::config, + DropTestCase::mut_config, + DropTestCase::set_config, + )); + fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>( + "drop_processor_name", + DropTestCase::has_drop_processor_name, + DropTestCase::drop_processor_name, + DropTestCase::set_drop_processor_name, + )); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "metrics", + |m: &DropTestCase| { &m.metrics }, + |m: &mut DropTestCase| { &mut m.metrics }, + )); + oneofs.push(drop_test_case::Config_type::generated_oneof_descriptor_data()); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "DropTestCase", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for DropTestCase { + const NAME: &'static str = "DropTestCase"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.config_type = ::std::option::Option::Some(drop_test_case::Config_type::Config(is.read_message()?)); + }, + 18 => { + self.config_type = ::std::option::Option::Some(drop_test_case::Config_type::DropProcessorName(is.read_tokio_chars()?)); + }, + 26 => { + self.metrics.push(is.read_message()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + for value in &self.metrics { + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + }; + if let ::std::option::Option::Some(ref v) = self.config_type { + match v { + &drop_test_case::Config_type::Config(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + }, + &drop_test_case::Config_type::DropProcessorName(ref v) => { + my_size += ::protobuf::rt::string_size(2, &v); + }, + }; + } + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + for v in &self.metrics { + ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; + }; + if let ::std::option::Option::Some(ref v) = self.config_type { + match v { + &drop_test_case::Config_type::Config(ref v) => { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; + }, + &drop_test_case::Config_type::DropProcessorName(ref v) => { + os.write_string(2, v)?; + }, + }; + } + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> DropTestCase { + DropTestCase::new() + } + + fn clear(&mut self) { + self.config_type = ::std::option::Option::None; + self.config_type = ::std::option::Option::None; + self.metrics.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static DropTestCase { + static instance: DropTestCase = DropTestCase { + metrics: ::std::vec::Vec::new(), + config_type: ::std::option::Option::None, + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for DropTestCase { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("DropTestCase").unwrap()).clone() + } +} + +impl ::std::fmt::Display for DropTestCase { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for DropTestCase { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +/// Nested message and enums of message `DropTestCase` +pub mod drop_test_case { + + #[derive(Clone,PartialEq,Debug)] + // @@protoc_insertion_point(oneof:pulse.drop_tester.v1.DropTestCase.config_type) + pub enum Config_type { + // @@protoc_insertion_point(oneof_field:pulse.drop_tester.v1.DropTestCase.config) + Config(super::super::drop::DropConfig), + // @@protoc_insertion_point(oneof_field:pulse.drop_tester.v1.DropTestCase.drop_processor_name) + DropProcessorName(::protobuf::Chars), + } + + impl ::protobuf::Oneof for Config_type { + } + + impl ::protobuf::OneofFull for Config_type { + fn descriptor() -> ::protobuf::reflect::OneofDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| ::descriptor().oneof_by_name("config_type").unwrap()).clone() + } + } + + impl Config_type { + pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData { + ::protobuf::reflect::GeneratedOneofDescriptorData::new::("config_type") + } + } +} + +// @@protoc_insertion_point(message:pulse.drop_tester.v1.DropTesterConfig) +#[derive(PartialEq,Clone,Default,Debug)] +pub struct DropTesterConfig { + // message fields + // @@protoc_insertion_point(field:pulse.drop_tester.v1.DropTesterConfig.test_cases) + pub test_cases: ::std::vec::Vec, + // special fields + // @@protoc_insertion_point(special_field:pulse.drop_tester.v1.DropTesterConfig.special_fields) + pub special_fields: ::protobuf::SpecialFields, +} + +impl<'a> ::std::default::Default for &'a DropTesterConfig { + fn default() -> &'a DropTesterConfig { + ::default_instance() + } +} + +impl DropTesterConfig { + pub fn new() -> DropTesterConfig { + ::std::default::Default::default() + } + + fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { + let mut fields = ::std::vec::Vec::with_capacity(1); + let mut oneofs = ::std::vec::Vec::with_capacity(0); + fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( + "test_cases", + |m: &DropTesterConfig| { &m.test_cases }, + |m: &mut DropTesterConfig| { &mut m.test_cases }, + )); + ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( + "DropTesterConfig", + fields, + oneofs, + ) + } +} + +impl ::protobuf::Message for DropTesterConfig { + const NAME: &'static str = "DropTesterConfig"; + + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { + while let Some(tag) = is.read_raw_tag_or_eof()? { + match tag { + 10 => { + self.test_cases.push(is.read_message()?); + }, + tag => { + ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u64 { + let mut my_size = 0; + for value in &self.test_cases { + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; + }; + my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); + self.special_fields.cached_size().set(my_size as u32); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { + for v in &self.test_cases { + ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; + }; + os.write_unknown_fields(self.special_fields.unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn special_fields(&self) -> &::protobuf::SpecialFields { + &self.special_fields + } + + fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { + &mut self.special_fields + } + + fn new() -> DropTesterConfig { + DropTesterConfig::new() + } + + fn clear(&mut self) { + self.test_cases.clear(); + self.special_fields.clear(); + } + + fn default_instance() -> &'static DropTesterConfig { + static instance: DropTesterConfig = DropTesterConfig { + test_cases: ::std::vec::Vec::new(), + special_fields: ::protobuf::SpecialFields::new(), + }; + &instance + } +} + +impl ::protobuf::MessageFull for DropTesterConfig { + fn descriptor() -> ::protobuf::reflect::MessageDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().message_by_package_relative_name("DropTesterConfig").unwrap()).clone() + } +} + +impl ::std::fmt::Display for DropTesterConfig { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for DropTesterConfig { + type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; +} + +static file_descriptor_proto_data: &'static [u8] = b"\ + \n&pulse/drop_tester/v1/drop_tester.proto\x12\x14pulse.drop_tester.v1\ + \x1a$pulse/config/processor/v1/drop.proto\x1a\x17validate/validate.proto\ + \"N\n\x0eMetricDropTest\x12\x1d\n\x05input\x18\x01\x20\x01(\tR\x05inputB\ + \x07\xfaB\x04r\x02\x10\x01\x12\x1d\n\ndropped_by\x18\x02\x20\x01(\tR\tdr\ + oppedBy\"\xf1\x01\n\x0cDropTestCase\x12H\n\x06config\x18\x01\x20\x01(\ + \x0b2%.pulse.config.processor.v1.DropConfigH\0R\x06configB\x07\xfaB\x04r\ + \x02\x10\x01\x129\n\x13drop_processor_name\x18\x02\x20\x01(\tH\0R\x11dro\ + pProcessorNameB\x07\xfaB\x04r\x02\x10\x01\x12H\n\x07metrics\x18\x03\x20\ + \x03(\x0b2$.pulse.drop_tester.v1.MetricDropTestR\x07metricsB\x08\xfaB\ + \x05\x92\x01\x02\x08\x01B\x12\n\x0bconfig_type\x12\x03\xf8B\x01\"_\n\x10\ + DropTesterConfig\x12K\n\ntest_cases\x18\x01\x20\x03(\x0b2\".pulse.drop_t\ + ester.v1.DropTestCaseR\ttestCasesB\x08\xfaB\x05\x92\x01\x02\x08\x01b\x06\ + proto3\ +"; + +/// `FileDescriptorProto` object which was a source for this generated file +fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { + static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); + file_descriptor_proto_lazy.get(|| { + ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() + }) +} + +/// `FileDescriptor` object which allows dynamic access to files +pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { + static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); + static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); + file_descriptor.get(|| { + let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { + let mut deps = ::std::vec::Vec::with_capacity(2); + deps.push(super::drop::file_descriptor().clone()); + deps.push(super::validate::file_descriptor().clone()); + let mut messages = ::std::vec::Vec::with_capacity(3); + messages.push(MetricDropTest::generated_message_descriptor_data()); + messages.push(DropTestCase::generated_message_descriptor_data()); + messages.push(DropTesterConfig::generated_message_descriptor_data()); + let mut enums = ::std::vec::Vec::with_capacity(0); + ::protobuf::reflect::GeneratedFileDescriptor::new_generated( + file_descriptor_proto(), + deps, + messages, + enums, + ) + }); + ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) + }) +} diff --git a/pulse-protobuf/src/protos/pulse/drop_tester/v1/mod.rs b/pulse-protobuf/src/protos/pulse/drop_tester/v1/mod.rs new file mode 100644 index 0000000..78d1098 --- /dev/null +++ b/pulse-protobuf/src/protos/pulse/drop_tester/v1/mod.rs @@ -0,0 +1,3 @@ +pub mod drop_tester; +use crate::protos::pulse::config::processor::v1::drop; +use bd_pgv::generated::protos::validate; diff --git a/pulse-protobuf/src/protos/pulse/mod.rs b/pulse-protobuf/src/protos/pulse/mod.rs index c7a8126..4792d52 100644 --- a/pulse-protobuf/src/protos/pulse/mod.rs +++ b/pulse-protobuf/src/protos/pulse/mod.rs @@ -6,5 +6,6 @@ // https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt pub mod config; +pub mod drop_tester; pub mod internode; pub mod vrl_tester; From 24fca8a7b4fddc1a9b9ffd3beb954c819903e231 Mon Sep 17 00:00:00 2001 From: Matt Klein Date: Wed, 27 Aug 2025 09:22:19 -0600 Subject: [PATCH 2/2] fix Signed-off-by: Matt Klein --- pulse-drop-tester/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pulse-drop-tester/src/lib.rs b/pulse-drop-tester/src/lib.rs index 3e2cdc6..0eb3bfd 100644 --- a/pulse-drop-tester/src/lib.rs +++ b/pulse-drop-tester/src/lib.rs @@ -12,6 +12,8 @@ use anyhow::{anyhow, bail}; use bd_server_stats::stats::Collector; use config::bootstrap::v1::bootstrap::Config; use config::processor::v1::processor::processor_config::Processor_type; +use drop::DropConfig; +use drop::drop_processor_config::Config_source; use protobuf::Message; use pulse_common::proto::yaml_to_proto; use pulse_metrics::pipeline::processor::drop::TranslatedDropConfig; @@ -19,8 +21,7 @@ use pulse_metrics::protos::metric::{DownstreamId, MetricSource, ParsedMetric}; use pulse_metrics::protos::statsd; use pulse_protobuf::protos::pulse::config; use pulse_protobuf::protos::pulse::config::common::v1::common::wire_protocol::StatsD; -use pulse_protobuf::protos::pulse::config::processor::v1::drop::DropConfig; -use pulse_protobuf::protos::pulse::config::processor::v1::drop::drop_processor_config::Config_source; +use pulse_protobuf::protos::pulse::config::processor::v1::drop; use pulse_protobuf::protos::pulse::config::processor::v1::processor::ProcessorConfig; use pulse_protobuf::protos::pulse::drop_tester::v1::drop_tester::drop_test_case::Config_type; use pulse_protobuf::protos::pulse::drop_tester::v1::drop_tester::{DropTestCase, DropTesterConfig};