@temporalio/core-bridge 1.12.1 → 1.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +64 -119
- package/Cargo.toml +1 -1
- package/package.json +3 -3
- package/releases/aarch64-apple-darwin/index.node +0 -0
- package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
- package/releases/x86_64-apple-darwin/index.node +0 -0
- package/releases/x86_64-pc-windows-msvc/index.node +0 -0
- package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
- package/sdk-core/.cargo/config.toml +1 -2
- package/sdk-core/.github/workflows/per-pr.yml +2 -0
- package/sdk-core/AGENTS.md +7 -0
- package/sdk-core/Cargo.toml +9 -5
- package/sdk-core/README.md +6 -5
- package/sdk-core/client/Cargo.toml +3 -2
- package/sdk-core/client/src/lib.rs +17 -8
- package/sdk-core/client/src/metrics.rs +57 -23
- package/sdk-core/client/src/raw.rs +33 -15
- package/sdk-core/core/Cargo.toml +11 -9
- package/sdk-core/core/benches/workflow_replay.rs +114 -15
- package/sdk-core/core/src/core_tests/activity_tasks.rs +18 -18
- package/sdk-core/core/src/core_tests/child_workflows.rs +4 -4
- package/sdk-core/core/src/core_tests/determinism.rs +6 -6
- package/sdk-core/core/src/core_tests/local_activities.rs +20 -20
- package/sdk-core/core/src/core_tests/mod.rs +40 -5
- package/sdk-core/core/src/core_tests/queries.rs +25 -16
- package/sdk-core/core/src/core_tests/replay_flag.rs +3 -3
- package/sdk-core/core/src/core_tests/updates.rs +3 -3
- package/sdk-core/core/src/core_tests/workers.rs +9 -7
- package/sdk-core/core/src/core_tests/workflow_tasks.rs +40 -42
- package/sdk-core/core/src/ephemeral_server/mod.rs +1 -19
- package/sdk-core/core/src/lib.rs +10 -1
- package/sdk-core/core/src/pollers/poll_buffer.rs +2 -2
- package/sdk-core/core/src/replay/mod.rs +3 -3
- package/sdk-core/core/src/telemetry/metrics.rs +306 -152
- package/sdk-core/core/src/telemetry/mod.rs +11 -4
- package/sdk-core/core/src/telemetry/otel.rs +134 -131
- package/sdk-core/core/src/telemetry/prometheus_meter.rs +885 -0
- package/sdk-core/core/src/telemetry/prometheus_server.rs +48 -28
- package/sdk-core/core/src/test_help/mod.rs +27 -12
- package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +7 -7
- package/sdk-core/core/src/worker/activities.rs +4 -4
- package/sdk-core/core/src/worker/client/mocks.rs +10 -3
- package/sdk-core/core/src/worker/client.rs +68 -5
- package/sdk-core/core/src/worker/heartbeat.rs +229 -0
- package/sdk-core/core/src/worker/mod.rs +35 -14
- package/sdk-core/core/src/worker/tuner/resource_based.rs +4 -4
- package/sdk-core/core/src/worker/workflow/history_update.rs +71 -19
- package/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +1 -2
- package/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +1 -1
- package/sdk-core/core/src/worker/workflow/machines/nexus_operation_state_machine.rs +31 -48
- package/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +1 -2
- package/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +3 -3
- package/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +4 -1
- package/sdk-core/core/src/worker/workflow/managed_run.rs +1 -1
- package/sdk-core/core/src/worker/workflow/mod.rs +15 -15
- package/sdk-core/core-api/Cargo.toml +2 -2
- package/sdk-core/core-api/src/envconfig.rs +204 -99
- package/sdk-core/core-api/src/lib.rs +9 -0
- package/sdk-core/core-api/src/telemetry/metrics.rs +548 -100
- package/sdk-core/core-api/src/worker.rs +11 -5
- package/sdk-core/core-c-bridge/Cargo.toml +49 -0
- package/sdk-core/core-c-bridge/build.rs +26 -0
- package/sdk-core/core-c-bridge/include/temporal-sdk-core-c-bridge.h +817 -0
- package/sdk-core/core-c-bridge/src/client.rs +679 -0
- package/sdk-core/core-c-bridge/src/lib.rs +245 -0
- package/sdk-core/core-c-bridge/src/metric.rs +682 -0
- package/sdk-core/core-c-bridge/src/random.rs +61 -0
- package/sdk-core/core-c-bridge/src/runtime.rs +445 -0
- package/sdk-core/core-c-bridge/src/testing.rs +282 -0
- package/sdk-core/core-c-bridge/src/tests/context.rs +644 -0
- package/sdk-core/core-c-bridge/src/tests/mod.rs +178 -0
- package/sdk-core/core-c-bridge/src/tests/utils.rs +108 -0
- package/sdk-core/core-c-bridge/src/worker.rs +1069 -0
- package/sdk-core/etc/deps.svg +64 -64
- package/sdk-core/sdk/src/activity_context.rs +6 -4
- package/sdk-core/sdk/src/lib.rs +49 -27
- package/sdk-core/sdk/src/workflow_future.rs +18 -25
- package/sdk-core/sdk-core-protos/protos/api_upstream/README.md +4 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/buf.yaml +0 -2
- package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv2.json +630 -83
- package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv3.yaml +632 -78
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/batch/v1/message.proto +4 -4
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/command/v1/message.proto +6 -4
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/common/v1/message.proto +2 -2
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/deployment/v1/message.proto +32 -2
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/common.proto +10 -1
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/deployment.proto +26 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +2 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/reset.proto +4 -4
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/failure/v1/message.proto +2 -2
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/history/v1/message.proto +47 -31
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/nexus/v1/message.proto +4 -4
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/schedule/v1/message.proto +7 -1
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/worker/v1/message.proto +134 -0
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflow/v1/message.proto +14 -11
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +148 -37
- package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +21 -0
- package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +4 -4
- package/sdk-core/sdk-core-protos/src/history_builder.rs +9 -5
- package/sdk-core/sdk-core-protos/src/lib.rs +96 -6
- package/sdk-core/test-utils/src/lib.rs +11 -3
- package/sdk-core/tests/cloud_tests.rs +3 -3
- package/sdk-core/tests/heavy_tests.rs +11 -3
- package/sdk-core/tests/integ_tests/client_tests.rs +12 -13
- package/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +1 -1
- package/sdk-core/tests/integ_tests/metrics_tests.rs +188 -83
- package/sdk-core/tests/integ_tests/polling_tests.rs +1 -1
- package/sdk-core/tests/integ_tests/queries_tests.rs +56 -40
- package/sdk-core/tests/integ_tests/update_tests.rs +2 -7
- package/sdk-core/tests/integ_tests/worker_tests.rs +3 -4
- package/sdk-core/tests/integ_tests/worker_versioning_tests.rs +3 -7
- package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +3 -5
- package/sdk-core/tests/integ_tests/workflow_tests/nexus.rs +24 -17
- package/src/client.rs +6 -0
- package/src/metrics.rs +6 -6
package/Cargo.lock
CHANGED
|
@@ -64,28 +64,6 @@ dependencies = [
|
|
|
64
64
|
"derive_arbitrary",
|
|
65
65
|
]
|
|
66
66
|
|
|
67
|
-
[[package]]
|
|
68
|
-
name = "async-stream"
|
|
69
|
-
version = "0.3.6"
|
|
70
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
71
|
-
checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476"
|
|
72
|
-
dependencies = [
|
|
73
|
-
"async-stream-impl",
|
|
74
|
-
"futures-core",
|
|
75
|
-
"pin-project-lite",
|
|
76
|
-
]
|
|
77
|
-
|
|
78
|
-
[[package]]
|
|
79
|
-
name = "async-stream-impl"
|
|
80
|
-
version = "0.3.6"
|
|
81
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
82
|
-
checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
|
|
83
|
-
dependencies = [
|
|
84
|
-
"proc-macro2",
|
|
85
|
-
"quote",
|
|
86
|
-
"syn",
|
|
87
|
-
]
|
|
88
|
-
|
|
89
67
|
[[package]]
|
|
90
68
|
name = "async-trait"
|
|
91
69
|
version = "0.1.88"
|
|
@@ -111,11 +89,10 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
|
|
111
89
|
|
|
112
90
|
[[package]]
|
|
113
91
|
name = "axum"
|
|
114
|
-
version = "0.
|
|
92
|
+
version = "0.8.4"
|
|
115
93
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
116
|
-
checksum = "
|
|
94
|
+
checksum = "021e862c184ae977658b36c4500f7feac3221ca5da43e3f25bd04ab6c79a29b5"
|
|
117
95
|
dependencies = [
|
|
118
|
-
"async-trait",
|
|
119
96
|
"axum-core",
|
|
120
97
|
"bytes",
|
|
121
98
|
"futures-util",
|
|
@@ -131,20 +108,19 @@ dependencies = [
|
|
|
131
108
|
"rustversion",
|
|
132
109
|
"serde",
|
|
133
110
|
"sync_wrapper",
|
|
134
|
-
"tower
|
|
111
|
+
"tower",
|
|
135
112
|
"tower-layer",
|
|
136
113
|
"tower-service",
|
|
137
114
|
]
|
|
138
115
|
|
|
139
116
|
[[package]]
|
|
140
117
|
name = "axum-core"
|
|
141
|
-
version = "0.
|
|
118
|
+
version = "0.5.2"
|
|
142
119
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
143
|
-
checksum = "
|
|
120
|
+
checksum = "68464cd0412f486726fb3373129ef5d2993f90c34bc2bc1c1e9943b2f4fc7ca6"
|
|
144
121
|
dependencies = [
|
|
145
|
-
"async-trait",
|
|
146
122
|
"bytes",
|
|
147
|
-
"futures-
|
|
123
|
+
"futures-core",
|
|
148
124
|
"http",
|
|
149
125
|
"http-body",
|
|
150
126
|
"http-body-util",
|
|
@@ -787,6 +763,16 @@ dependencies = [
|
|
|
787
763
|
"version_check",
|
|
788
764
|
]
|
|
789
765
|
|
|
766
|
+
[[package]]
|
|
767
|
+
name = "gethostname"
|
|
768
|
+
version = "1.0.2"
|
|
769
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
770
|
+
checksum = "fc257fdb4038301ce4b9cd1b3b51704509692bb3ff716a410cbd07925d9dae55"
|
|
771
|
+
dependencies = [
|
|
772
|
+
"rustix",
|
|
773
|
+
"windows-targets 0.52.6",
|
|
774
|
+
]
|
|
775
|
+
|
|
790
776
|
[[package]]
|
|
791
777
|
name = "getrandom"
|
|
792
778
|
version = "0.2.16"
|
|
@@ -820,12 +806,6 @@ version = "0.31.1"
|
|
|
820
806
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
821
807
|
checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
|
|
822
808
|
|
|
823
|
-
[[package]]
|
|
824
|
-
name = "glob"
|
|
825
|
-
version = "0.3.2"
|
|
826
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
827
|
-
checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
|
|
828
|
-
|
|
829
809
|
[[package]]
|
|
830
810
|
name = "governor"
|
|
831
811
|
version = "0.8.1"
|
|
@@ -861,19 +841,13 @@ dependencies = [
|
|
|
861
841
|
"futures-core",
|
|
862
842
|
"futures-sink",
|
|
863
843
|
"http",
|
|
864
|
-
"indexmap
|
|
844
|
+
"indexmap",
|
|
865
845
|
"slab",
|
|
866
846
|
"tokio",
|
|
867
847
|
"tokio-util",
|
|
868
848
|
"tracing",
|
|
869
849
|
]
|
|
870
850
|
|
|
871
|
-
[[package]]
|
|
872
|
-
name = "hashbrown"
|
|
873
|
-
version = "0.12.3"
|
|
874
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
875
|
-
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
|
876
|
-
|
|
877
851
|
[[package]]
|
|
878
852
|
name = "hashbrown"
|
|
879
853
|
version = "0.14.5"
|
|
@@ -1137,16 +1111,6 @@ dependencies = [
|
|
|
1137
1111
|
"icu_properties",
|
|
1138
1112
|
]
|
|
1139
1113
|
|
|
1140
|
-
[[package]]
|
|
1141
|
-
name = "indexmap"
|
|
1142
|
-
version = "1.9.3"
|
|
1143
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1144
|
-
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
|
|
1145
|
-
dependencies = [
|
|
1146
|
-
"autocfg",
|
|
1147
|
-
"hashbrown 0.12.3",
|
|
1148
|
-
]
|
|
1149
|
-
|
|
1150
1114
|
[[package]]
|
|
1151
1115
|
name = "indexmap"
|
|
1152
1116
|
version = "2.9.0"
|
|
@@ -1333,9 +1297,9 @@ dependencies = [
|
|
|
1333
1297
|
|
|
1334
1298
|
[[package]]
|
|
1335
1299
|
name = "matchit"
|
|
1336
|
-
version = "0.
|
|
1300
|
+
version = "0.8.4"
|
|
1337
1301
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1338
|
-
checksum = "
|
|
1302
|
+
checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3"
|
|
1339
1303
|
|
|
1340
1304
|
[[package]]
|
|
1341
1305
|
name = "memchr"
|
|
@@ -1508,29 +1472,41 @@ dependencies = [
|
|
|
1508
1472
|
"tracing",
|
|
1509
1473
|
]
|
|
1510
1474
|
|
|
1475
|
+
[[package]]
|
|
1476
|
+
name = "opentelemetry"
|
|
1477
|
+
version = "0.30.0"
|
|
1478
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1479
|
+
checksum = "aaf416e4cb72756655126f7dd7bb0af49c674f4c1b9903e80c009e0c37e552e6"
|
|
1480
|
+
dependencies = [
|
|
1481
|
+
"futures-core",
|
|
1482
|
+
"futures-sink",
|
|
1483
|
+
"js-sys",
|
|
1484
|
+
"pin-project-lite",
|
|
1485
|
+
"thiserror 2.0.12",
|
|
1486
|
+
"tracing",
|
|
1487
|
+
]
|
|
1488
|
+
|
|
1511
1489
|
[[package]]
|
|
1512
1490
|
name = "opentelemetry-http"
|
|
1513
|
-
version = "0.
|
|
1491
|
+
version = "0.30.0"
|
|
1514
1492
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1515
|
-
checksum = "
|
|
1493
|
+
checksum = "50f6639e842a97dbea8886e3439710ae463120091e2e064518ba8e716e6ac36d"
|
|
1516
1494
|
dependencies = [
|
|
1517
1495
|
"async-trait",
|
|
1518
1496
|
"bytes",
|
|
1519
1497
|
"http",
|
|
1520
|
-
"opentelemetry",
|
|
1498
|
+
"opentelemetry 0.30.0",
|
|
1521
1499
|
"reqwest",
|
|
1522
|
-
"tracing",
|
|
1523
1500
|
]
|
|
1524
1501
|
|
|
1525
1502
|
[[package]]
|
|
1526
1503
|
name = "opentelemetry-otlp"
|
|
1527
|
-
version = "0.
|
|
1504
|
+
version = "0.30.0"
|
|
1528
1505
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1529
|
-
checksum = "
|
|
1506
|
+
checksum = "dbee664a43e07615731afc539ca60c6d9f1a9425e25ca09c57bc36c87c55852b"
|
|
1530
1507
|
dependencies = [
|
|
1531
|
-
"futures-core",
|
|
1532
1508
|
"http",
|
|
1533
|
-
"opentelemetry",
|
|
1509
|
+
"opentelemetry 0.30.0",
|
|
1534
1510
|
"opentelemetry-http",
|
|
1535
1511
|
"opentelemetry-proto",
|
|
1536
1512
|
"opentelemetry_sdk",
|
|
@@ -1542,26 +1518,13 @@ dependencies = [
|
|
|
1542
1518
|
"tracing",
|
|
1543
1519
|
]
|
|
1544
1520
|
|
|
1545
|
-
[[package]]
|
|
1546
|
-
name = "opentelemetry-prometheus"
|
|
1547
|
-
version = "0.29.1"
|
|
1548
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1549
|
-
checksum = "098a71a4430bb712be6130ed777335d2e5b19bc8566de5f2edddfce906def6ab"
|
|
1550
|
-
dependencies = [
|
|
1551
|
-
"once_cell",
|
|
1552
|
-
"opentelemetry",
|
|
1553
|
-
"opentelemetry_sdk",
|
|
1554
|
-
"prometheus",
|
|
1555
|
-
"tracing",
|
|
1556
|
-
]
|
|
1557
|
-
|
|
1558
1521
|
[[package]]
|
|
1559
1522
|
name = "opentelemetry-proto"
|
|
1560
|
-
version = "0.
|
|
1523
|
+
version = "0.30.0"
|
|
1561
1524
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1562
|
-
checksum = "
|
|
1525
|
+
checksum = "2e046fd7660710fe5a05e8748e70d9058dc15c94ba914e7c4faa7c728f0e8ddc"
|
|
1563
1526
|
dependencies = [
|
|
1564
|
-
"opentelemetry",
|
|
1527
|
+
"opentelemetry 0.30.0",
|
|
1565
1528
|
"opentelemetry_sdk",
|
|
1566
1529
|
"prost",
|
|
1567
1530
|
"tonic",
|
|
@@ -1569,22 +1532,20 @@ dependencies = [
|
|
|
1569
1532
|
|
|
1570
1533
|
[[package]]
|
|
1571
1534
|
name = "opentelemetry_sdk"
|
|
1572
|
-
version = "0.
|
|
1535
|
+
version = "0.30.0"
|
|
1573
1536
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1574
|
-
checksum = "
|
|
1537
|
+
checksum = "11f644aa9e5e31d11896e024305d7e3c98a88884d9f8919dbf37a9991bc47a4b"
|
|
1575
1538
|
dependencies = [
|
|
1576
1539
|
"futures-channel",
|
|
1577
1540
|
"futures-executor",
|
|
1578
1541
|
"futures-util",
|
|
1579
|
-
"
|
|
1580
|
-
"opentelemetry",
|
|
1542
|
+
"opentelemetry 0.30.0",
|
|
1581
1543
|
"percent-encoding",
|
|
1582
1544
|
"rand 0.9.1",
|
|
1583
1545
|
"serde_json",
|
|
1584
1546
|
"thiserror 2.0.12",
|
|
1585
1547
|
"tokio",
|
|
1586
1548
|
"tokio-stream",
|
|
1587
|
-
"tracing",
|
|
1588
1549
|
]
|
|
1589
1550
|
|
|
1590
1551
|
[[package]]
|
|
@@ -1649,7 +1610,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
1649
1610
|
checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772"
|
|
1650
1611
|
dependencies = [
|
|
1651
1612
|
"fixedbitset",
|
|
1652
|
-
"indexmap
|
|
1613
|
+
"indexmap",
|
|
1653
1614
|
]
|
|
1654
1615
|
|
|
1655
1616
|
[[package]]
|
|
@@ -2158,7 +2119,7 @@ dependencies = [
|
|
|
2158
2119
|
"tokio",
|
|
2159
2120
|
"tokio-rustls",
|
|
2160
2121
|
"tokio-util",
|
|
2161
|
-
"tower
|
|
2122
|
+
"tower",
|
|
2162
2123
|
"tower-service",
|
|
2163
2124
|
"url",
|
|
2164
2125
|
"wasm-bindgen",
|
|
@@ -2599,6 +2560,7 @@ dependencies = [
|
|
|
2599
2560
|
"async-trait",
|
|
2600
2561
|
"backoff",
|
|
2601
2562
|
"base64",
|
|
2563
|
+
"bytes",
|
|
2602
2564
|
"derive_builder",
|
|
2603
2565
|
"derive_more",
|
|
2604
2566
|
"futures-retry",
|
|
@@ -2614,7 +2576,7 @@ dependencies = [
|
|
|
2614
2576
|
"thiserror 2.0.12",
|
|
2615
2577
|
"tokio",
|
|
2616
2578
|
"tonic",
|
|
2617
|
-
"tower
|
|
2579
|
+
"tower",
|
|
2618
2580
|
"tracing",
|
|
2619
2581
|
"url",
|
|
2620
2582
|
"uuid",
|
|
@@ -2637,6 +2599,7 @@ dependencies = [
|
|
|
2637
2599
|
"flate2",
|
|
2638
2600
|
"futures-channel",
|
|
2639
2601
|
"futures-util",
|
|
2602
|
+
"gethostname",
|
|
2640
2603
|
"governor",
|
|
2641
2604
|
"http-body-util",
|
|
2642
2605
|
"hyper",
|
|
@@ -2644,9 +2607,8 @@ dependencies = [
|
|
|
2644
2607
|
"itertools",
|
|
2645
2608
|
"lru",
|
|
2646
2609
|
"mockall",
|
|
2647
|
-
"opentelemetry",
|
|
2610
|
+
"opentelemetry 0.30.0",
|
|
2648
2611
|
"opentelemetry-otlp",
|
|
2649
|
-
"opentelemetry-prometheus",
|
|
2650
2612
|
"opentelemetry_sdk",
|
|
2651
2613
|
"parking_lot",
|
|
2652
2614
|
"pid",
|
|
@@ -2686,12 +2648,13 @@ dependencies = [
|
|
|
2686
2648
|
"async-trait",
|
|
2687
2649
|
"derive_builder",
|
|
2688
2650
|
"derive_more",
|
|
2689
|
-
"opentelemetry",
|
|
2651
|
+
"opentelemetry 0.30.0",
|
|
2690
2652
|
"prost",
|
|
2691
2653
|
"serde_json",
|
|
2692
2654
|
"temporal-sdk-core-protos",
|
|
2693
2655
|
"thiserror 2.0.12",
|
|
2694
2656
|
"tonic",
|
|
2657
|
+
"tracing",
|
|
2695
2658
|
"tracing-core",
|
|
2696
2659
|
"url",
|
|
2697
2660
|
]
|
|
@@ -2726,7 +2689,7 @@ dependencies = [
|
|
|
2726
2689
|
"bridge-macros",
|
|
2727
2690
|
"futures",
|
|
2728
2691
|
"neon",
|
|
2729
|
-
"opentelemetry",
|
|
2692
|
+
"opentelemetry 0.29.1",
|
|
2730
2693
|
"os_pipe",
|
|
2731
2694
|
"parking_lot",
|
|
2732
2695
|
"prost",
|
|
@@ -2908,11 +2871,10 @@ dependencies = [
|
|
|
2908
2871
|
|
|
2909
2872
|
[[package]]
|
|
2910
2873
|
name = "tonic"
|
|
2911
|
-
version = "0.
|
|
2874
|
+
version = "0.13.1"
|
|
2912
2875
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2913
|
-
checksum = "
|
|
2876
|
+
checksum = "7e581ba15a835f4d9ea06c55ab1bd4dce26fc53752c69a04aac00703bfb49ba9"
|
|
2914
2877
|
dependencies = [
|
|
2915
|
-
"async-stream",
|
|
2916
2878
|
"async-trait",
|
|
2917
2879
|
"axum",
|
|
2918
2880
|
"base64",
|
|
@@ -2928,12 +2890,11 @@ dependencies = [
|
|
|
2928
2890
|
"pin-project",
|
|
2929
2891
|
"prost",
|
|
2930
2892
|
"rustls-native-certs",
|
|
2931
|
-
"rustls-pemfile",
|
|
2932
2893
|
"socket2",
|
|
2933
2894
|
"tokio",
|
|
2934
2895
|
"tokio-rustls",
|
|
2935
2896
|
"tokio-stream",
|
|
2936
|
-
"tower
|
|
2897
|
+
"tower",
|
|
2937
2898
|
"tower-layer",
|
|
2938
2899
|
"tower-service",
|
|
2939
2900
|
"tracing",
|
|
@@ -2941,9 +2902,9 @@ dependencies = [
|
|
|
2941
2902
|
|
|
2942
2903
|
[[package]]
|
|
2943
2904
|
name = "tonic-build"
|
|
2944
|
-
version = "0.
|
|
2905
|
+
version = "0.13.1"
|
|
2945
2906
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2946
|
-
checksum = "
|
|
2907
|
+
checksum = "eac6f67be712d12f0b41328db3137e0d0757645d8904b4cb7d51cd9c2279e847"
|
|
2947
2908
|
dependencies = [
|
|
2948
2909
|
"prettyplease",
|
|
2949
2910
|
"proc-macro2",
|
|
@@ -2953,26 +2914,6 @@ dependencies = [
|
|
|
2953
2914
|
"syn",
|
|
2954
2915
|
]
|
|
2955
2916
|
|
|
2956
|
-
[[package]]
|
|
2957
|
-
name = "tower"
|
|
2958
|
-
version = "0.4.13"
|
|
2959
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2960
|
-
checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
|
|
2961
|
-
dependencies = [
|
|
2962
|
-
"futures-core",
|
|
2963
|
-
"futures-util",
|
|
2964
|
-
"indexmap 1.9.3",
|
|
2965
|
-
"pin-project",
|
|
2966
|
-
"pin-project-lite",
|
|
2967
|
-
"rand 0.8.5",
|
|
2968
|
-
"slab",
|
|
2969
|
-
"tokio",
|
|
2970
|
-
"tokio-util",
|
|
2971
|
-
"tower-layer",
|
|
2972
|
-
"tower-service",
|
|
2973
|
-
"tracing",
|
|
2974
|
-
]
|
|
2975
|
-
|
|
2976
2917
|
[[package]]
|
|
2977
2918
|
name = "tower"
|
|
2978
2919
|
version = "0.5.2"
|
|
@@ -2981,11 +2922,15 @@ checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9"
|
|
|
2981
2922
|
dependencies = [
|
|
2982
2923
|
"futures-core",
|
|
2983
2924
|
"futures-util",
|
|
2925
|
+
"indexmap",
|
|
2984
2926
|
"pin-project-lite",
|
|
2927
|
+
"slab",
|
|
2985
2928
|
"sync_wrapper",
|
|
2986
2929
|
"tokio",
|
|
2930
|
+
"tokio-util",
|
|
2987
2931
|
"tower-layer",
|
|
2988
2932
|
"tower-service",
|
|
2933
|
+
"tracing",
|
|
2989
2934
|
]
|
|
2990
2935
|
|
|
2991
2936
|
[[package]]
|
|
@@ -3705,7 +3650,7 @@ dependencies = [
|
|
|
3705
3650
|
"flate2",
|
|
3706
3651
|
"getrandom 0.3.3",
|
|
3707
3652
|
"hmac",
|
|
3708
|
-
"indexmap
|
|
3653
|
+
"indexmap",
|
|
3709
3654
|
"lzma-rs",
|
|
3710
3655
|
"memchr",
|
|
3711
3656
|
"pbkdf2",
|
package/Cargo.toml
CHANGED
|
@@ -42,7 +42,7 @@ temporal-client = { version = "*", path = "./sdk-core/client" }
|
|
|
42
42
|
thiserror = "2"
|
|
43
43
|
tokio = "1.13"
|
|
44
44
|
tokio-stream = "0.1"
|
|
45
|
-
tonic = "0.
|
|
45
|
+
tonic = "0.13"
|
|
46
46
|
tracing = "0.1"
|
|
47
47
|
tracing-subscriber = { version = "0.3", default-features = false, features = [
|
|
48
48
|
"parking_lot",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporalio/core-bridge",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.2",
|
|
4
4
|
"description": "Temporal.io SDK Core<>Node bridge",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@grpc/grpc-js": "^1.12.4",
|
|
26
|
-
"@temporalio/common": "1.12.
|
|
26
|
+
"@temporalio/common": "1.12.2",
|
|
27
27
|
"arg": "^5.0.2",
|
|
28
28
|
"cargo-cp-artifact": "^0.1.8",
|
|
29
29
|
"which": "^4.0.0"
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "98393e00b714b8d44a3dc25714d313d3366f4c50"
|
|
60
60
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
[env]
|
|
2
2
|
# This temporarily overrides the version of the CLI used for integration tests, locally and in CI
|
|
3
|
-
#
|
|
4
|
-
CLI_VERSION_OVERRIDE = "v1.3.1-priority.0"
|
|
3
|
+
#CLI_VERSION_OVERRIDE = "v1.3.1-priority.0"
|
|
5
4
|
|
|
6
5
|
[alias]
|
|
7
6
|
integ-test = ["test", "--features", "temporal-sdk-core-protos/serde_serialize", "--package", "temporal-sdk-core", "--test", "integ_runner", "--"]
|
package/sdk-core/AGENTS.md
CHANGED
|
@@ -8,6 +8,7 @@ document as your quick reference when submitting pull requests.
|
|
|
8
8
|
- `core/` – implementation of the core SDK
|
|
9
9
|
- `client/` – clients for communicating with Temporal clusters
|
|
10
10
|
- `core-api/` – API definitions exposed by core
|
|
11
|
+
- `core-c-bridge/` – C interface for core
|
|
11
12
|
- `sdk/` – pre-alpha Rust SDK built on top of core (used mainly for tests)
|
|
12
13
|
- `sdk-core-protos/` – protobuf definitions shared across crates
|
|
13
14
|
- `fsm/` – state machine implementation and macros
|
|
@@ -15,6 +16,7 @@ document as your quick reference when submitting pull requests.
|
|
|
15
16
|
- `tests/` – integration, heavy, and manual tests
|
|
16
17
|
- `arch_docs/` – architectural design documents
|
|
17
18
|
- Contributor guide: `README.md`
|
|
19
|
+
- `target/` - This contains compiled files. You never need to look in here.
|
|
18
20
|
|
|
19
21
|
## Repo Specific Utilities
|
|
20
22
|
|
|
@@ -38,6 +40,9 @@ cargo integ-test # integration tests (starts ephemeral server by default)
|
|
|
38
40
|
cargo test --test heavy_tests # load tests -- agents do not need to run this and should not
|
|
39
41
|
```
|
|
40
42
|
|
|
43
|
+
Rust compilation can take some time. Do not interrupt builds or tests unless they are taking more
|
|
44
|
+
than 10 minutes.
|
|
45
|
+
|
|
41
46
|
Additional checks:
|
|
42
47
|
|
|
43
48
|
```bash
|
|
@@ -61,6 +66,8 @@ Documentation can be generated with `cargo doc`.
|
|
|
61
66
|
Reviewers will look for:
|
|
62
67
|
|
|
63
68
|
- All builds, tests, and lints passing in CI
|
|
69
|
+
- Note that some tests cause intentional panics. That does not mean the test failed. You should
|
|
70
|
+
only consider tests that have failed according to the harness to be a real problem.
|
|
64
71
|
- New tests covering behavior changes
|
|
65
72
|
- Clear and concise code following existing style (see `README.md` for error handling guidance)
|
|
66
73
|
- Documentation updates for any public API changes
|
package/sdk-core/Cargo.toml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[workspace]
|
|
2
|
-
members = ["core", "client", "core-api", "fsm", "test-utils", "sdk-core-protos", "sdk"]
|
|
2
|
+
members = ["core", "client", "core-api", "fsm", "test-utils", "sdk-core-protos", "sdk", "core-c-bridge"]
|
|
3
3
|
resolver = "2"
|
|
4
4
|
|
|
5
5
|
[workspace.package]
|
|
@@ -8,13 +8,17 @@ license-file = "LICENSE.txt"
|
|
|
8
8
|
|
|
9
9
|
[workspace.dependencies]
|
|
10
10
|
derive_builder = "0.20"
|
|
11
|
-
derive_more = { version = "2.0", features = ["constructor", "display", "from", "into", "debug"] }
|
|
11
|
+
derive_more = { version = "2.0", features = ["constructor", "display", "from", "into", "debug", "try_into"] }
|
|
12
12
|
thiserror = "2"
|
|
13
|
-
tonic = "0.
|
|
14
|
-
tonic-build = "0.
|
|
15
|
-
opentelemetry = { version = "0.
|
|
13
|
+
tonic = "0.13"
|
|
14
|
+
tonic-build = "0.13"
|
|
15
|
+
opentelemetry = { version = "0.30", features = ["metrics"] }
|
|
16
16
|
prost = "0.13"
|
|
17
17
|
prost-types = "0.13"
|
|
18
18
|
|
|
19
19
|
[workspace.lints.rust]
|
|
20
20
|
unreachable_pub = "warn"
|
|
21
|
+
|
|
22
|
+
[profile.release-lto]
|
|
23
|
+
inherits = "release"
|
|
24
|
+
lto = true
|
package/sdk-core/README.md
CHANGED
|
@@ -26,13 +26,14 @@ installed to build Core.
|
|
|
26
26
|
|
|
27
27
|
This repo is composed of multiple crates:
|
|
28
28
|
|
|
29
|
-
- temporal-sdk-core-protos `./sdk-core-protos` - Holds the generated proto code and extensions
|
|
30
|
-
- temporal-client `./client` - Defines client(s) for interacting with the Temporal gRPC service
|
|
31
|
-
- temporal-sdk-core-api `./core-api` - Defines the API surface exposed by Core
|
|
32
|
-
- temporal-sdk-core `./core` - The Core implementation
|
|
29
|
+
- temporal-sdk-core-protos `./sdk-core-protos` - Holds the generated proto code and extensions.
|
|
30
|
+
- temporal-client `./client` - Defines client(s) for interacting with the Temporal gRPC service.
|
|
31
|
+
- temporal-sdk-core-api `./core-api` - Defines the API surface exposed by Core.
|
|
32
|
+
- temporal-sdk-core `./core` - The Core implementation.
|
|
33
|
+
- temporal-sdk-core-c-bridge `./core-c-bridge` - Provides C bindings for Core.
|
|
33
34
|
- temporal-sdk `./sdk` - A (currently prototype) Rust SDK built on top of Core. Used for testing.
|
|
34
35
|
- rustfsm `./fsm` - Implements a procedural macro used by core for defining state machines
|
|
35
|
-
(contains subcrates). It is
|
|
36
|
+
(contains subcrates). It is Temporal-agnostic.
|
|
36
37
|
|
|
37
38
|
Visualized (dev dependencies are in blue):
|
|
38
39
|
|
|
@@ -20,9 +20,10 @@ backoff = "0.4"
|
|
|
20
20
|
base64 = "0.22"
|
|
21
21
|
derive_builder = { workspace = true }
|
|
22
22
|
derive_more = { workspace = true }
|
|
23
|
+
bytes = "1.10"
|
|
23
24
|
futures-util = { version = "0.3", default-features = false }
|
|
24
25
|
futures-retry = "0.6.0"
|
|
25
|
-
http = "1.1
|
|
26
|
+
http = "1.1"
|
|
26
27
|
http-body-util = "0.1"
|
|
27
28
|
hyper = { version = "1.4.1" }
|
|
28
29
|
hyper-util = "0.1.6"
|
|
@@ -31,7 +32,7 @@ parking_lot = "0.12"
|
|
|
31
32
|
slotmap = "1.0"
|
|
32
33
|
thiserror = { workspace = true }
|
|
33
34
|
tokio = "1.1"
|
|
34
|
-
tonic = { workspace = true, features = ["tls", "tls-roots"] }
|
|
35
|
+
tonic = { workspace = true, features = ["tls-ring", "tls-native-roots"] }
|
|
35
36
|
tower = { version = "0.5", features = ["util"] }
|
|
36
37
|
tracing = "0.1"
|
|
37
38
|
url = "2.2"
|
|
@@ -72,7 +72,7 @@ use temporal_sdk_core_protos::{
|
|
|
72
72
|
};
|
|
73
73
|
use tonic::{
|
|
74
74
|
Code,
|
|
75
|
-
body::
|
|
75
|
+
body::Body,
|
|
76
76
|
client::GrpcService,
|
|
77
77
|
codegen::InterceptedService,
|
|
78
78
|
metadata::{MetadataKey, MetadataMap, MetadataValue},
|
|
@@ -115,7 +115,7 @@ pub struct ClientOptions {
|
|
|
115
115
|
pub client_version: String,
|
|
116
116
|
|
|
117
117
|
/// A human-readable string that can identify this process. Defaults to empty string.
|
|
118
|
-
#[builder(default)]
|
|
118
|
+
#[builder(setter(into), default)]
|
|
119
119
|
pub identity: String,
|
|
120
120
|
|
|
121
121
|
/// If specified, use TLS as configured by the [TlsConfig] struct. If this is set core will
|
|
@@ -595,7 +595,7 @@ fn get_decode_max_size() -> usize {
|
|
|
595
595
|
impl<T> TemporalServiceClient<T>
|
|
596
596
|
where
|
|
597
597
|
T: Clone,
|
|
598
|
-
T: GrpcService<
|
|
598
|
+
T: GrpcService<Body> + Send + Clone + 'static,
|
|
599
599
|
T::ResponseBody: tonic::codegen::Body<Data = tonic::codegen::Bytes> + Send + 'static,
|
|
600
600
|
T::Error: Into<tonic::codegen::StdError>,
|
|
601
601
|
<T::ResponseBody as tonic::codegen::Body>::Error: Into<tonic::codegen::StdError> + Send,
|
|
@@ -1175,13 +1175,13 @@ impl From<common::v1::Priority> for Priority {
|
|
|
1175
1175
|
impl<T> WorkflowClientTrait for T
|
|
1176
1176
|
where
|
|
1177
1177
|
T: RawClientLike + NamespacedClient + Clone + Send + Sync + 'static,
|
|
1178
|
-
<Self as RawClientLike>::SvcType: GrpcService<
|
|
1179
|
-
<<Self as RawClientLike>::SvcType as GrpcService<
|
|
1178
|
+
<Self as RawClientLike>::SvcType: GrpcService<Body> + Send + Clone + 'static,
|
|
1179
|
+
<<Self as RawClientLike>::SvcType as GrpcService<Body>>::ResponseBody:
|
|
1180
1180
|
tonic::codegen::Body<Data = tonic::codegen::Bytes> + Send + 'static,
|
|
1181
|
-
<<Self as RawClientLike>::SvcType as GrpcService<
|
|
1181
|
+
<<Self as RawClientLike>::SvcType as GrpcService<Body>>::Error:
|
|
1182
1182
|
Into<tonic::codegen::StdError>,
|
|
1183
|
-
<<Self as RawClientLike>::SvcType as GrpcService<
|
|
1184
|
-
<<<Self as RawClientLike>::SvcType as GrpcService<
|
|
1183
|
+
<<Self as RawClientLike>::SvcType as GrpcService<Body>>::Future: Send,
|
|
1184
|
+
<<<Self as RawClientLike>::SvcType as GrpcService<Body>>::ResponseBody
|
|
1185
1185
|
as tonic::codegen::Body>::Error: Into<tonic::codegen::StdError> + Send,
|
|
1186
1186
|
{
|
|
1187
1187
|
async fn start_workflow(
|
|
@@ -1673,6 +1673,15 @@ impl<T> RequestExt for tonic::Request<T> {
|
|
|
1673
1673
|
}
|
|
1674
1674
|
}
|
|
1675
1675
|
|
|
1676
|
+
macro_rules! dbg_panic {
|
|
1677
|
+
($($arg:tt)*) => {
|
|
1678
|
+
use tracing::error;
|
|
1679
|
+
error!($($arg)*);
|
|
1680
|
+
debug_assert!(false, $($arg)*);
|
|
1681
|
+
};
|
|
1682
|
+
}
|
|
1683
|
+
pub(crate) use dbg_panic;
|
|
1684
|
+
|
|
1676
1685
|
#[cfg(test)]
|
|
1677
1686
|
mod tests {
|
|
1678
1687
|
use super::*;
|