Skip to content

Commit 4614dcb

Browse files
authored
Upgrade all non-tonic/prost deps (#998)
1 parent 1dcde8c commit 4614dcb

File tree

12 files changed

+133
-78
lines changed

12 files changed

+133
-78
lines changed

client/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ derive_more = { workspace = true }
2323
bytes = "1.10"
2424
futures-util = { version = "0.3", default-features = false }
2525
futures-retry = "0.6.0"
26-
http = "1.1"
26+
http = "1.3"
2727
http-body-util = "0.1"
28-
hyper = { version = "1.4.1" }
29-
hyper-util = "0.1.6"
28+
hyper = { version = "1.7.0" }
29+
hyper-util = "0.1.16"
3030
opentelemetry = { workspace = true, features = ["metrics"], optional = true }
3131
parking_lot = "0.12"
3232
slotmap = "1.0"
3333
thiserror = { workspace = true }
34-
tokio = "1.1"
34+
tokio = "1.47"
3535
tonic = { workspace = true, features = ["tls-ring", "tls-native-roots"] }
3636
tower = { version = "0.5", features = ["util"] }
3737
tracing = "0.1"
38-
url = "2.2"
39-
uuid = { version = "1.1", features = ["v4"] }
38+
url = "2.5"
39+
uuid = { version = "1.18", features = ["v4"] }
4040

4141
[dependencies.temporal-sdk-core-protos]
4242
path = "../sdk-core-protos"
@@ -47,7 +47,7 @@ path = "../core-api"
4747
[dev-dependencies]
4848
assert_matches = "1"
4949
mockall = "0.13"
50-
rstest = "0.25"
50+
rstest = "0.26"
5151

5252
[lints]
5353
workspace = true

core-api/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ envconfig = ["dep:toml", "dep:serde", "dep:dirs"]
1818

1919
[dependencies]
2020
async-trait = "0.1"
21-
dirs = { version = "5.0", optional = true }
21+
dirs = { version = "6.0", optional = true }
2222
derive_builder = { workspace = true }
2323
derive_more = { workspace = true }
2424
opentelemetry = { workspace = true, optional = true }
2525
prost = { workspace = true }
2626
serde = { version = "1.0", features = ["derive"], optional = true }
2727
serde_json = "1.0"
2828
thiserror = { workspace = true }
29-
toml = { version = "0.8", optional = true }
29+
toml = { version = "0.9", optional = true }
3030
tonic = { workspace = true }
3131
tracing = "0.1"
3232
tracing-core = "0.1"
33-
url = "2.3"
33+
url = "2.5"
3434

3535
[dependencies.temporal-sdk-core-protos]
3636
path = "../sdk-core-protos"
@@ -40,4 +40,4 @@ version = "0.1"
4040
workspace = true
4141

4242
[dev-dependencies]
43-
tempfile = "3.8"
43+
tempfile = "3.21"

core-api/src/lib.rs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use crate::{
1111
},
1212
worker::WorkerConfig,
1313
};
14+
use std::sync::Arc;
1415
use temporal_sdk_core_protos::coresdk::{
1516
ActivityHeartbeat, ActivityTaskCompletion,
1617
activity_task::ActivityTask,
@@ -139,6 +140,73 @@ pub trait Worker: Send + Sync {
139140
async fn finalize_shutdown(self);
140141
}
141142

143+
#[async_trait::async_trait]
144+
impl<W> Worker for Arc<W>
145+
where
146+
W: Worker + ?Sized,
147+
{
148+
async fn validate(&self) -> Result<(), WorkerValidationError> {
149+
(**self).validate().await
150+
}
151+
152+
async fn poll_workflow_activation(&self) -> Result<WorkflowActivation, PollError> {
153+
(**self).poll_workflow_activation().await
154+
}
155+
156+
async fn poll_activity_task(&self) -> Result<ActivityTask, PollError> {
157+
(**self).poll_activity_task().await
158+
}
159+
160+
async fn poll_nexus_task(&self) -> Result<NexusTask, PollError> {
161+
(**self).poll_nexus_task().await
162+
}
163+
164+
async fn complete_workflow_activation(
165+
&self,
166+
completion: WorkflowActivationCompletion,
167+
) -> Result<(), CompleteWfError> {
168+
(**self).complete_workflow_activation(completion).await
169+
}
170+
171+
async fn complete_activity_task(
172+
&self,
173+
completion: ActivityTaskCompletion,
174+
) -> Result<(), CompleteActivityError> {
175+
(**self).complete_activity_task(completion).await
176+
}
177+
178+
async fn complete_nexus_task(
179+
&self,
180+
completion: NexusTaskCompletion,
181+
) -> Result<(), CompleteNexusError> {
182+
(**self).complete_nexus_task(completion).await
183+
}
184+
185+
fn record_activity_heartbeat(&self, details: ActivityHeartbeat) {
186+
(**self).record_activity_heartbeat(details)
187+
}
188+
189+
fn request_workflow_eviction(&self, run_id: &str) {
190+
(**self).request_workflow_eviction(run_id)
191+
}
192+
193+
fn get_config(&self) -> &WorkerConfig {
194+
(**self).get_config()
195+
}
196+
197+
fn initiate_shutdown(&self) {
198+
(**self).initiate_shutdown()
199+
}
200+
201+
async fn shutdown(&self) {
202+
(**self).shutdown().await
203+
}
204+
205+
async fn finalize_shutdown(self) {
206+
panic!("Can't finalize shutdown on Arc'd worker")
207+
}
208+
}
209+
142210
macro_rules! dbg_panic {
143211
($($arg:tt)*) => {
144212
use tracing::error;

core-c-bridge/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ crate-type = ["cdylib"]
1111
anyhow = "1.0"
1212
async-trait = "0.1"
1313
futures-util = { version = "0.3", default-features = false }
14-
http = "1.1"
14+
http = "1.3"
1515
libc = "0.2"
1616
prost = { workspace = true }
1717
# We rely on Cargo semver rules not updating a 0.x to 0.y. Per the rand
1818
# documentation, before 1.0, minor 0.x updates _can_ break portability which can
1919
# cause non-determinism.
20-
rand = "0.8.5"
21-
rand_pcg = "0.3.1"
20+
rand = "0.9.2"
21+
rand_pcg = "0.9.0"
2222
serde_json = "1.0"
23-
tokio = "1.26"
23+
tokio = "1.47"
2424
tokio-stream = "0.1"
2525
tokio-util = "0.7"
2626
tonic = { workspace = true }
2727
tracing = "0.1"
28-
url = "2.2"
28+
url = "2.5"
2929

3030
[dependencies.temporal-client]
3131
path = "../client"

core-c-bridge/src/random.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ pub extern "C" fn temporal_core_random_int32_range(
3232
) -> i32 {
3333
let random = unsafe { &mut *random };
3434
if max_inclusive {
35-
random.rand.gen_range(min..=max)
35+
random.rand.random_range(min..=max)
3636
} else {
37-
random.rand.gen_range(min..max)
37+
random.rand.random_range(min..max)
3838
}
3939
}
4040

@@ -47,9 +47,9 @@ pub extern "C" fn temporal_core_random_double_range(
4747
) -> f64 {
4848
let random = unsafe { &mut *random };
4949
if max_inclusive {
50-
random.rand.gen_range(min..=max)
50+
random.rand.random_range(min..=max)
5151
} else {
52-
random.rand.gen_range(min..max)
52+
random.rand.random_range(min..max)
5353
}
5454
}
5555

core/Cargo.toml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,28 @@ console-subscriber = { version = "0.4", optional = true }
2828
crossbeam-channel = "0.5"
2929
crossbeam-queue = "0.3"
3030
crossbeam-utils = "0.8"
31-
dashmap = "6.0"
31+
dashmap = "6.1"
3232
derive_builder = { workspace = true }
3333
derive_more = { workspace = true }
3434
enum_dispatch = "0.3"
3535
enum-iterator = "2"
36-
flate2 = { version = "1.0", optional = true }
36+
flate2 = { version = "1.1", optional = true }
3737
futures-util = { version = "0.3", default-features = false }
3838
futures-channel = { version = "0.3", default-features = false, features = ["std"] }
3939
gethostname = "1.0.2"
40-
governor = "0.8"
40+
governor = "0.10"
4141
http-body-util = { version = "0.1", optional = true }
42-
hyper = { version = "1.2", optional = true }
42+
hyper = { version = "1.7", optional = true }
4343
hyper-util = { version = "0.1", features = ["server", "http1", "http2", "tokio"], optional = true }
4444
itertools = "0.14"
45-
lru = "0.13"
45+
lru = "0.16"
4646
mockall = "0.13"
4747
opentelemetry = { workspace = true, features = ["metrics"], optional = true }
4848
opentelemetry_sdk = { version = "0.30", features = ["rt-tokio", "metrics", "spec_unstable_metrics_views"], optional = true }
4949
opentelemetry-otlp = { version = "0.30", features = ["tokio", "metrics", "tls", "http-proto", "grpc-tonic"], optional = true }
5050
parking_lot = { version = "0.12", features = ["send_guard"] }
5151
pid = "4.0"
52-
pin-project = "1.0"
52+
pin-project = "1.1"
5353
prometheus = { version = "0.14", optional = true }
5454
prost = { workspace = true }
5555
prost-types = { version = "0.6", package = "prost-wkt-types" }
@@ -60,18 +60,18 @@ serde = "1.0"
6060
serde_json = "1.0"
6161
siphasher = "1.0"
6262
slotmap = "1.0"
63-
sysinfo = { version = "0.33", default-features = false, features = ["system"] }
63+
sysinfo = { version = "0.37", default-features = false, features = ["system"] }
6464
tar = { version = "0.4", optional = true }
6565
thiserror = { workspace = true }
66-
tokio = { version = "1.37", features = ["rt", "rt-multi-thread", "parking_lot", "time", "fs", "process"] }
66+
tokio = { version = "1.47", features = ["rt", "rt-multi-thread", "parking_lot", "time", "fs", "process"] }
6767
tokio-util = { version = "0.7", features = ["io", "io-util"] }
6868
tokio-stream = "0.1"
6969
tonic = { workspace = true, features = ["tls-ring", "tls-native-roots"] }
7070
tracing = "0.1"
7171
tracing-subscriber = { version = "0.3", default-features = false, features = ["parking_lot", "env-filter", "registry", "ansi"] }
72-
url = "2.2"
73-
uuid = { version = "1.1", features = ["v4"] }
74-
zip = { version = "2.0", optional = true }
72+
url = "2.5"
73+
uuid = { version = "1.18", features = ["v4"] }
74+
zip = { version = "4.6", optional = true }
7575

7676
# 1st party local deps
7777
[dependencies.temporal-sdk-core-api]
@@ -89,14 +89,14 @@ path = "../client"
8989
path = "../fsm"
9090

9191
[dev-dependencies]
92-
assert_matches = "1.4"
93-
bimap = "0.6.1"
94-
clap = { version = "4.0", features = ["derive"] }
95-
criterion = { version = "0.6", features = ["async", "async_tokio"] }
96-
rstest = "0.25"
92+
assert_matches = "1.5"
93+
bimap = "0.6.3"
94+
clap = { version = "4.5", features = ["derive"] }
95+
criterion = { version = "0.7", features = ["async", "async_tokio"] }
96+
rstest = "0.26"
9797
temporal-sdk-core-test-utils = { path = "../test-utils" }
9898
temporal-sdk = { path = "../sdk" }
99-
tokio = { version = "1.37", features = ["rt", "rt-multi-thread", "parking_lot", "time", "fs", "process", "test-util"] }
99+
tokio = { version = "1.47", features = ["rt", "rt-multi-thread", "parking_lot", "time", "fs", "process", "test-util"] }
100100
tokio-stream = { version = "0.1", features = ["net"] }
101101

102102
[[test]]

core/src/test_help/mod.rs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,30 +1065,7 @@ pub(crate) trait WorkerExt {
10651065
#[async_trait]
10661066
impl WorkerExt for Worker {
10671067
async fn drain_pollers_and_shutdown(self) {
1068-
self.initiate_shutdown();
1069-
tokio::join!(
1070-
async {
1071-
assert_matches!(
1072-
self.poll_activity_task().await.unwrap_err(),
1073-
PollError::ShutDown
1074-
);
1075-
},
1076-
async {
1077-
loop {
1078-
match self.poll_workflow_activation().await {
1079-
Err(PollError::ShutDown) => break,
1080-
Ok(a) if a.is_only_eviction() => {
1081-
self.complete_workflow_activation(WorkflowActivationCompletion::empty(
1082-
a.run_id,
1083-
))
1084-
.await
1085-
.unwrap();
1086-
}
1087-
o => panic!("Unexpected activation while draining: {o:?}"),
1088-
}
1089-
}
1090-
}
1091-
);
1068+
temporal_sdk_core_test_utils::drain_pollers_and_shutdown(&self).await;
10921069
self.finalize_shutdown().await;
10931070
}
10941071

sdk-core-protos/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ serde = { version = "1.0", features = ["derive"] }
2626
serde_json = "1.0"
2727
thiserror = { workspace = true }
2828
tonic = { workspace = true }
29-
uuid = { version = "1.1", features = ["v4"], optional = true }
29+
uuid = { version = "1.18", features = ["v4"], optional = true }
3030

3131
[build-dependencies]
3232
tonic-build = { workspace = true }

sdk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ futures-util = { version = "0.3", default-features = false }
1818
parking_lot = { version = "0.12", features = ["send_guard"] }
1919
prost-types = { version = "0.6", package = "prost-wkt-types" }
2020
serde = "1.0"
21-
tokio = { version = "1.26", features = ["rt", "rt-multi-thread", "parking_lot", "time", "fs"] }
21+
tokio = { version = "1.47", features = ["rt", "rt-multi-thread", "parking_lot", "time", "fs"] }
2222
tokio-util = { version = "0.7" }
2323
tokio-stream = "0.1"
2424
tracing = "0.1"

test-utils/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ assert_matches = "1"
1919
async-trait = "0.1"
2020
bytes = "1.10"
2121
futures-util = { version = "0.3", default-features = false }
22-
hyper = { version = "1.4.1" }
22+
hyper = { version = "1.7.0" }
2323
http-body-util = "0.1"
24-
hyper-util = "0.1.6"
24+
hyper-util = "0.1.16"
2525
parking_lot = "0.12"
2626
prost = { workspace = true }
2727
rand = "0.9"
@@ -30,9 +30,9 @@ temporal-client = { path = "../client" }
3030
temporal-sdk = { path = "../sdk" }
3131
temporal-sdk-core = { path = "../core" }
3232
temporal-sdk-core-api = { path = "../core-api" }
33-
tokio = "1.1"
33+
tokio = "1.47"
3434
tracing = "0.1"
35-
url = "2.2"
35+
url = "2.5"
3636

3737
[dependencies.temporal-sdk-core-protos]
3838
path = "../sdk-core-protos"

0 commit comments

Comments
 (0)