Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1fb5dfa
Add Push Mode (Task Dispatchers and Pushers)
george-sentry Mar 16, 2026
a728613
Add Unit Tests, Flush Tasks on Shutdown
george-sentry Mar 17, 2026
6866ef2
Switch to Sentry Protos Release
george-sentry Mar 17, 2026
0a53d58
Replace Dispatcher w/Separate Fetch and Push Pools
george-sentry Mar 18, 2026
043559a
Initialize gRPC Server w/`0.0.0.0`
george-sentry Mar 18, 2026
f70cc3a
Add `PushPool` Unit Tests
george-sentry Mar 18, 2026
dafa06c
Add `FetchPool` Unit Tests
george-sentry Mar 18, 2026
e47a1e8
Fix Linting
george-sentry Mar 18, 2026
cb47f99
Address PR Comments (Fix Bugs, Make More Robust)
george-sentry Mar 18, 2026
aa055bc
Move Tasks Back to Pending on Push Failure, Add Server Unit Test for …
george-sentry Mar 18, 2026
2f540ad
Make Empty Store Backoff Configurable, Other Fixes and Tests
george-sentry Mar 18, 2026
97f00b0
Return Error from `fetch_activation` on Submit Failure
george-sentry Mar 18, 2026
6db46a0
Fix Fetch Unit Tests
george-sentry Mar 18, 2026
cf06e6b
Don't Use `FetchNextTask` When in Push Mode
george-sentry Mar 18, 2026
d28397d
Do Not Reset Task Status on Push Failure
george-sentry Mar 19, 2026
d42ffb5
Change Push Mode Config Name, Rename Helpers Module
george-sentry Mar 19, 2026
90825d4
Add Application and Namespace Filters to Config
george-sentry Mar 19, 2026
8839d50
Minor Store Trait Refactor, Remove Separate Fetch Function
george-sentry Mar 23, 2026
517caa3
Don't Allow Empty Namespace List and No Application
george-sentry Mar 23, 2026
8d71ad1
Small Tweaks
george-sentry Mar 23, 2026
bb05772
Shut Down on Initial Connection Failure
george-sentry Mar 24, 2026
6acfa8b
Timeout on Push
george-sentry Mar 24, 2026
0588cdb
Attempt Fixing Flaky Rebalance Integ. Test
george-sentry Mar 24, 2026
34f4bfa
Wait for Broker to Finish to Fix Integ. Test
george-sentry Mar 25, 2026
a5bbd15
Minor Edit (No More Flaky Rebalancing Test!)
george-sentry Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 48 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ clap = { version = "4.5.20", features = ["derive"] }
derive_builder = "0.20.2"
elegant-departure = { version = "0.3.1", features = ["tokio"] }
figment = { version = "0.10.19", features = ["env", "yaml", "test"] }
flume = "0.12.0"
futures = "0.3.31"
futures-util = "0.3.31"
hex = "0.4.3"
Expand All @@ -26,8 +27,8 @@ http-body-util = "0.1.2"
libsqlite3-sys = "0.30.1"
metrics = "0.24.0"
metrics-exporter-statsd = "0.9.0"
prost = "0.13"
prost-types = "0.13.3"
prost = "0.14"
prost-types = "0.14"
rand = "0.8.5"
rdkafka = { version = "0.37.0", features = ["cmake-build", "ssl"] }
sentry = { version = "0.41.0", default-features = false, features = [
Expand All @@ -41,16 +42,16 @@ sentry = { version = "0.41.0", default-features = false, features = [
"tracing",
"logs"
] }
sentry_protos = "0.4.11"
sentry_protos = "0.8.5"
serde = "1.0.214"
serde_yaml = "0.9.34"
sha2 = "0.10.8"
sqlx = { version = "0.8.3", features = ["sqlite", "runtime-tokio", "chrono", "postgres"] }
tokio = { version = "1.43.1", features = ["full"] }
tokio-stream = { version = "0.1.16", features = ["full"] }
tokio-util = "0.7.12"
tonic = "0.13"
tonic-health = "0.13"
tonic = "0.14"
tonic-health = "0.14"
tower = "0.5.1"
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = [
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ The test suite is composed of unit and integration tests in Rust, and end-to-end

```bash
# Run unit/integration tests
make test
make unit-test

# Run end-to-end tests
make integration-test
Expand Down
2 changes: 1 addition & 1 deletion benches/store_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async fn get_pending_activations(num_activations: u32, num_workers: u32) {
let mut num_activations_processed = 0;

while store
.get_pending_activation(Some("sentry"), Some(&ns))
.get_pending_activation(Some("sentry"), Some(std::slice::from_ref(&ns)))
.await
.unwrap()
.is_some()
Expand Down
5 changes: 4 additions & 1 deletion integration_tests/integration_tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
TASKBROKER_ROOT = Path(__file__).parent.parent.parent
TASKBROKER_BIN = TASKBROKER_ROOT / "target/debug/taskbroker"
TESTS_OUTPUT_ROOT = Path(__file__).parent.parent / ".tests_output"

TASKBROKER_RESTART_PORT_DELAY_SEC = 1.0

TEST_PRODUCER_CONFIG = {
"bootstrap.servers": "127.0.0.1:9092",
"broker.address.family": "v4",
Expand Down Expand Up @@ -212,7 +215,7 @@ def get_num_tasks_group_by_status(


def get_available_ports(count: int) -> list[int]:
MIN = 49152
MIN = 50051
MAX = 65535
res = []
for i in range(count):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

from integration_tests.helpers import (
TASKBROKER_BIN,
TASKBROKER_RESTART_PORT_DELAY_SEC,
TESTS_OUTPUT_ROOT,
TaskbrokerConfig,
create_topic,
Expand Down Expand Up @@ -48,6 +49,13 @@ def manage_taskbroker(
assert return_code == 0
except Exception:
process.kill()
try:
process.wait(timeout=10)
except subprocess.TimeoutExpired:
pass

if i < iterations - 1:
time.sleep(TASKBROKER_RESTART_PORT_DELAY_SEC)


def test_tasks_written_once_during_rebalancing() -> None:
Expand Down
Loading
Loading