Skip to content

Commit d919b22

Browse files
chore: update core (#1807)
Co-authored-by: Andrew Yuan <[email protected]>
1 parent ae9066e commit d919b22

20 files changed

+196
-204
lines changed

packages/core-bridge/Cargo.lock

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

packages/core-bridge/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ prost = "0.14"
3535
prost-types = "0.14"
3636
serde = { version = "1.0", features = ["derive"] }
3737
serde_json = "1.0"
38-
temporal-sdk-core = { version = "*", path = "./sdk-core/core", features = [
38+
temporalio-sdk-core = { version = "*", path = "./sdk-core/crates/sdk-core", features = [
3939
"ephemeral-server",
4040
] }
41-
temporal-client = { version = "*", path = "./sdk-core/client" }
41+
temporalio-client = { version = "*", path = "./sdk-core/crates/client" }
42+
temporalio-common = { version = "*", path = "./sdk-core/crates/common" }
4243
thiserror = "2"
4344
tokio = "1.13"
4445
tokio-stream = "0.1"

packages/core-bridge/sdk-core

Submodule sdk-core updated 362 files

packages/core-bridge/src/client.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use std::{collections::HashMap, sync::Arc};
55
use neon::prelude::*;
66
use tonic::metadata::{BinaryMetadataValue, MetadataKey};
77

8-
use temporal_sdk_core::{ClientOptions as CoreClientOptions, CoreRuntime, RetryClient};
8+
use temporalio_sdk_core::{ClientOptions as CoreClientOptions, CoreRuntime, RetryClient};
99

1010
use bridge_macros::{TryFromJs, js_function};
11-
use temporal_client::{ClientInitError, ConfiguredClient, TemporalServiceClient};
11+
use temporalio_client::{ClientInitError, ConfiguredClient, TemporalServiceClient};
1212

1313
use crate::runtime::Runtime;
1414
use crate::{helpers::*, runtime::RuntimeExt as _};
@@ -257,7 +257,7 @@ async fn client_invoke_workflow_service(
257257
mut retry_client: CoreClient,
258258
call: RpcCall,
259259
) -> BridgeResult<Vec<u8>> {
260-
use temporal_client::WorkflowService;
260+
use temporalio_client::WorkflowService;
261261

262262
match call.rpc.as_str() {
263263
"CountWorkflowExecutions" => {
@@ -528,7 +528,7 @@ async fn client_invoke_operator_service(
528528
mut retry_client: CoreClient,
529529
call: RpcCall,
530530
) -> BridgeResult<Vec<u8>> {
531-
use temporal_client::OperatorService;
531+
use temporalio_client::OperatorService;
532532

533533
match call.rpc.as_str() {
534534
"AddOrUpdateRemoteCluster" => {
@@ -566,7 +566,7 @@ async fn client_invoke_test_service(
566566
mut retry_client: CoreClient,
567567
call: RpcCall,
568568
) -> BridgeResult<Vec<u8>> {
569-
use temporal_client::TestService;
569+
use temporalio_client::TestService;
570570

571571
match call.rpc.as_str() {
572572
"GetCurrentTime" => rpc_call!(retry_client, call, get_current_time),
@@ -588,7 +588,7 @@ async fn client_invoke_health_service(
588588
mut retry_client: CoreClient,
589589
call: RpcCall,
590590
) -> BridgeResult<Vec<u8>> {
591-
use temporal_client::HealthService;
591+
use temporalio_client::HealthService;
592592

593593
match call.rpc.as_str() {
594594
"Check" => rpc_call!(retry_client, call, check),
@@ -658,8 +658,8 @@ mod config {
658658

659659
use anyhow::Context as _;
660660

661-
use temporal_client::HttpConnectProxyOptions;
662-
use temporal_sdk_core::{
661+
use temporalio_client::HttpConnectProxyOptions;
662+
use temporalio_sdk_core::{
663663
ClientOptions as CoreClientOptions, ClientOptionsBuilder,
664664
ClientTlsConfig as CoreClientTlsConfig, TlsConfig as CoreTlsConfig, Url,
665665
};

packages/core-bridge/src/helpers/try_from_js.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use neon::{
99
Value, buffer::TypedArray,
1010
},
1111
};
12-
use temporal_sdk_core::Url;
12+
use temporalio_sdk_core::Url;
1313

1414
use super::{AppendFieldContext, BridgeError, BridgeResult};
1515

packages/core-bridge/src/logs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::{
66
use neon::prelude::*;
77

88
use serde::{Serialize, ser::SerializeMap as _};
9-
use temporal_sdk_core::api::telemetry::CoreLog;
9+
use temporalio_common::telemetry::CoreLog;
1010

1111
use bridge_macros::js_function;
1212

packages/core-bridge/src/metrics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ use anyhow::Context as _;
44
use neon::prelude::*;
55
use serde::Deserialize;
66

7-
use temporal_sdk_core::api::telemetry::metrics::{
7+
use temporalio_common::telemetry::metrics::{
88
CoreMeter, Counter as CoreCounter, Gauge as CoreGauge, Histogram as CoreHistogram,
99
MetricParametersBuilder, NewAttributes, TemporalMeter,
1010
};
11-
use temporal_sdk_core::api::telemetry::metrics::{
11+
use temporalio_common::telemetry::metrics::{
1212
GaugeF64 as CoreGaugeF64, HistogramF64 as CoreHistogramF64,
1313
};
14-
use temporal_sdk_core::api::telemetry::metrics::{
14+
use temporalio_common::telemetry::metrics::{
1515
MetricKeyValue as CoreMetricKeyValue, MetricValue as CoreMetricValue,
1616
};
1717

packages/core-bridge/src/runtime.rs

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ use futures::channel::mpsc::Receiver;
55
use neon::prelude::*;
66
use tracing::{Instrument, warn};
77

8-
use temporal_sdk_core::{
9-
CoreRuntime, TokioRuntimeBuilder,
10-
api::telemetry::{
11-
CoreLog, OtelCollectorOptions as CoreOtelCollectorOptions,
12-
PrometheusExporterOptions as CorePrometheusExporterOptions, metrics::CoreMeter,
13-
},
8+
use temporalio_common::telemetry::{
9+
CoreLog, OtelCollectorOptions as CoreOtelCollectorOptions,
10+
PrometheusExporterOptions as CorePrometheusExporterOptions, metrics::CoreMeter,
11+
};
12+
use temporalio_sdk_core::{
13+
CoreRuntime, RuntimeOptionsBuilder, TokioRuntimeBuilder,
1414
telemetry::{build_otlp_metric_exporter, start_prometheus_metric_exporter},
1515
};
1616

@@ -62,11 +62,13 @@ pub fn runtime_new(
6262
let (telemetry_options, metrics_options, logging_options) = bridge_options.try_into()?;
6363

6464
// Create core runtime which starts tokio multi-thread runtime
65-
let mut core_runtime = CoreRuntime::new(
66-
telemetry_options,
67-
TokioRuntimeBuilder::default(),
68-
)
69-
.context("Failed to initialize Core Runtime")?;
65+
let runtime_options = RuntimeOptionsBuilder::default()
66+
.telemetry_options(telemetry_options)
67+
.heartbeat_interval(None)
68+
.build()
69+
.context("Failed to build runtime options")?;
70+
let mut core_runtime = CoreRuntime::new(runtime_options, TokioRuntimeBuilder::default())
71+
.context("Failed to initialize Core Runtime")?;
7072

7173
enter_sync!(core_runtime);
7274

@@ -238,17 +240,14 @@ mod config {
238240
use anyhow::Context as _;
239241

240242
use neon::prelude::*;
241-
use temporal_sdk_core::{
242-
Url,
243-
api::telemetry::{
244-
HistogramBucketOverrides, Logger as CoreTelemetryLogger, MetricTemporality,
245-
OtelCollectorOptions as CoreOtelCollectorOptions, OtelCollectorOptionsBuilder,
246-
OtlpProtocol, PrometheusExporterOptions as CorePrometheusExporterOptions,
247-
PrometheusExporterOptionsBuilder, TelemetryOptions as CoreTelemetryOptions,
248-
TelemetryOptionsBuilder,
249-
},
250-
telemetry::CoreLogStreamConsumer,
243+
use temporalio_common::telemetry::{
244+
HistogramBucketOverrides, Logger as CoreTelemetryLogger, MetricTemporality,
245+
OtelCollectorOptions as CoreOtelCollectorOptions, OtelCollectorOptionsBuilder,
246+
OtlpProtocol, PrometheusExporterOptions as CorePrometheusExporterOptions,
247+
PrometheusExporterOptionsBuilder, TelemetryOptions as CoreTelemetryOptions,
248+
TelemetryOptionsBuilder,
251249
};
250+
use temporalio_sdk_core::{Url, telemetry::CoreLogStreamConsumer};
252251

253252
use bridge_macros::TryFromJs;
254253

0 commit comments

Comments
 (0)