Skip to content

Commit e89a7c7

Browse files
authored
Bump shared core for blocking_recv_with_timeout changes (#442)
* Bump shared core * Running now * add start_in_sleep_mode to ios too * Update tickets
1 parent c429879 commit e89a7c7

File tree

10 files changed

+737
-758
lines changed

10 files changed

+737
-758
lines changed

Cargo.Bazel.lock

Lines changed: 531 additions & 577 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.lock

Lines changed: 147 additions & 148 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,27 @@ android_logger = { version = "0.15.0", default-features = false }
1818
anyhow = "1.0.98"
1919
assert_matches = "1.5.0"
2020
async-trait = "0.1.88"
21-
bd-api = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
22-
bd-buffer = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
23-
bd-client-common = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
24-
bd-client-stats-store = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
25-
bd-crash-handler = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
26-
bd-device = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
27-
bd-grpc = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
28-
bd-hyper-network = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
29-
bd-key-value = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
30-
bd-log = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
31-
bd-log-metadata = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
32-
bd-log-primitives = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
33-
bd-logger = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
34-
bd-noop-network = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
35-
bd-proto = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
36-
bd-report-writer = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
37-
bd-runtime = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
38-
bd-session = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
39-
bd-shutdown = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
40-
bd-test-helpers = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675", default-features = false }
41-
bd-time = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
21+
bd-api = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
22+
bd-buffer = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
23+
bd-client-common = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
24+
bd-client-stats-store = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
25+
bd-crash-handler = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
26+
bd-device = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
27+
bd-grpc = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
28+
bd-hyper-network = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
29+
bd-key-value = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
30+
bd-log = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
31+
bd-log-metadata = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
32+
bd-log-primitives = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
33+
bd-logger = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
34+
bd-noop-network = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
35+
bd-proto = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
36+
bd-report-writer = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
37+
bd-runtime = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
38+
bd-session = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
39+
bd-shutdown = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
40+
bd-test-helpers = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42", default-features = false }
41+
bd-time = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
4242
chrono = "0.4.41"
4343
clap = { version = "4.5.37", features = ["derive", "env"] }
4444
ctor = "0.4.2"

platform/jvm/src/jni.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,7 @@ pub extern "system" fn Java_io_bitdrift_capture_CaptureJniLibrary_createLogger(
663663
store,
664664
network: network_manager,
665665
static_metadata,
666+
start_in_sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5425
666667
})
667668
.with_internal_logger(true)
668669
.build()

platform/swift/source/src/bridge.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ extern "C" fn capture_create_logger(
493493
store,
494494
device,
495495
static_metadata,
496+
start_in_sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5426
496497
})
497498
.with_internal_logger(true)
498499
.build()

platform/test_helpers/src/lib.rs

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,15 @@ pub extern "C" fn wait_for_stream_with_test_api_key(stream_id: i32) {
9797
#[no_mangle]
9898
pub extern "C" fn await_api_server_received_handshake(stream_id: i32) {
9999
with_expected_server(|h| {
100-
assert!(StreamHandle::from_stream_id(stream_id, h)
101-
.await_event_with_timeout(ExpectedStreamEvent::Handshake(None), Duration::seconds(15)));
100+
assert!(
101+
StreamHandle::from_stream_id(stream_id, h).await_event_with_timeout(
102+
ExpectedStreamEvent::Handshake {
103+
matcher: None,
104+
sleep_mode: false // TODO(kattrali): Will be handled as part of BIT-5425
105+
},
106+
Duration::seconds(15)
107+
)
108+
);
102109
});
103110
}
104111

@@ -189,7 +196,10 @@ pub extern "C" fn configure_aggressive_continuous_uploads(stream_id: i32) {
189196
let stream = StreamHandle::from_stream_id(stream_id, h);
190197
// Ensure that we've received the handshake.
191198
assert!(stream.await_event_with_timeout(
192-
ExpectedStreamEvent::Handshake(None),
199+
ExpectedStreamEvent::Handshake {
200+
matcher: None,
201+
sleep_mode: false // TODO(kattrali): Will be handled as part of BIT-5425
202+
},
193203
Duration::milliseconds(2000),
194204
));
195205

@@ -264,7 +274,10 @@ pub extern "C" fn run_large_upload_test(logger_id: LoggerId<'_>) -> bool {
264274

265275
let is_succes = with_expected_server(|h| {
266276
if !StreamHandle::from_stream_id(stream_id, h).await_event_with_timeout(
267-
ExpectedStreamEvent::Handshake(None),
277+
ExpectedStreamEvent::Handshake {
278+
matcher: None,
279+
sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5425
280+
},
268281
Duration::milliseconds(800),
269282
) {
270283
return false;
@@ -367,8 +380,13 @@ pub extern "C" fn run_aggressive_upload_test_with_stream_drops(logger_id: Logger
367380

368381
stream = h.blocking_next_stream()?;
369382

370-
assert!(stream
371-
.await_event_with_timeout(ExpectedStreamEvent::Handshake(None), Duration::seconds(10),));
383+
assert!(stream.await_event_with_timeout(
384+
ExpectedStreamEvent::Handshake {
385+
matcher: None,
386+
sleep_mode: false // TODO(kattrali): Will be handled as part of BIT-5425
387+
},
388+
Duration::seconds(10),
389+
));
372390
}
373391

374392
// Verify at least one upload to make sure that things are working as expected.

test/benchmark/src/bin/live_benchmark.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ fn test_live_match_performance(c: &mut Criterion) {
4949
session_replay_target: Box::new(bd_test_helpers::session_replay::NoOpTarget),
5050
events_listener_target: Box::new(bd_test_helpers::events::NoOpListenerTarget),
5151
device,
52+
start_in_sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5425
5253
})
5354
.build()
5455
.unwrap()

test/benchmark/src/bin/logger_benchmark.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ fn simple_log(c: &mut Criterion) {
6666
store,
6767
network: Box::new(NoopNetwork {}),
6868
static_metadata: Arc::new(EmptyMetadata),
69+
start_in_sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5425
6970
})
7071
.build()
7172
.unwrap()
@@ -110,6 +111,7 @@ fn with_matcher_and_buffer(c: &mut Criterion) {
110111
store,
111112
network: Box::new(NoopNetwork {}),
112113
static_metadata: Arc::new(EmptyMetadata),
114+
start_in_sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5425
113115
})
114116
.build()
115117
.unwrap()

test/platform/jvm/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ pub extern "C" fn Java_io_bitdrift_capture_CaptureTestJniLibrary_awaitApiServerR
114114

115115
platform_test_helpers::with_expected_server(|h| {
116116
StreamHandle::from_stream_id(stream_id, h).await_event_with_timeout(
117-
ExpectedStreamEvent::Handshake(
118-
HandshakeMatcher {
117+
ExpectedStreamEvent::Handshake {
118+
matcher: Some(HandshakeMatcher {
119119
attributes: expected_attributes,
120120
attribute_keys_to_ignore: expected_attribute_keys_to_ignore,
121-
}
122-
.into(),
123-
),
121+
}),
122+
sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5425
123+
},
124124
Duration::seconds(5),
125125
)
126126
})

test/platform/swift/bridging/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ unsafe extern "C" fn test_stream_received_handshake(stream_id: i32, continuation
115115
h.enqueue_expected_event(
116116
Event::StreamEvent(
117117
stream_id,
118-
ExpectedStreamEvent::Handshake(None),
118+
ExpectedStreamEvent::Handshake {
119+
matcher: None,
120+
sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5425
121+
},
119122
Box::new(Continuation::new(continuation)),
120123
),
121124
Duration::seconds(5),

0 commit comments

Comments
 (0)