Skip to content

Commit

Permalink
chore: Update Core to latest (#1571)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjameswh authored Nov 19, 2024
1 parent ddcf0b3 commit 4daeafe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
9 changes: 4 additions & 5 deletions packages/client/src/async-completion-client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { status as grpcStatus } from '@grpc/grpc-js';
import { ensureTemporalFailure } from '@temporalio/common';
import type { temporal } from '@temporalio/proto';
import {
encodeErrorToFailure,
encodeToPayloads,
Expand Down Expand Up @@ -216,23 +215,23 @@ export class AsyncCompletionClient extends BaseClient {
const payloads = await encodeToPayloads(this.dataConverter, details);
let cancelRequested = false;
try {
let response: temporal.api.workflowservice.v1.RecordActivityTaskHeartbeatResponse;
if (taskTokenOrFullActivityId instanceof Uint8Array) {
response = await this.workflowService.recordActivityTaskHeartbeat({
const response = await this.workflowService.recordActivityTaskHeartbeat({
identity: this.options.identity,
namespace: this.options.namespace,
taskToken: taskTokenOrFullActivityId,
details: { payloads },
});
cancelRequested = !!response.cancelRequested;
} else {
response = await this.workflowService.recordActivityTaskHeartbeatById({
const response = await this.workflowService.recordActivityTaskHeartbeatById({
identity: this.options.identity,
namespace: this.options.namespace,
...taskTokenOrFullActivityId,
details: { payloads },
});
cancelRequested = !!response.cancelRequested;
}
cancelRequested = !!response.cancelRequested;
} catch (err) {
this.handleError(err);
}
Expand Down
1 change: 1 addition & 0 deletions packages/core-bridge/Cargo.lock

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

2 changes: 1 addition & 1 deletion packages/core-bridge/sdk-core
Submodule sdk-core updated 38 files
+2 −0 client/src/lib.rs
+45 −0 client/src/raw.rs
+5 −1 core/src/abstractions.rs
+6 −0 core/src/core_tests/activity_tasks.rs
+72 −3 core/src/core_tests/workers.rs
+27 −3 core/src/lib.rs
+1 −1 core/src/worker/activities/activity_heartbeat_manager.rs
+14 −18 core/src/worker/activities/local_activities.rs
+17 −0 core/src/worker/client.rs
+7 −1 core/src/worker/client/mocks.rs
+52 −4 core/src/worker/mod.rs
+9 −2 core/src/worker/workflow/mod.rs
+1 −0 sdk-core-protos/Cargo.toml
+4 −0 sdk-core-protos/build.rs
+0 −3 sdk-core-protos/protos/api_upstream/.gitmodules
+1 −0 sdk-core-protos/protos/api_upstream/buf.yaml
+3,207 −158 sdk-core-protos/protos/api_upstream/openapi/openapiv2.json
+2,934 −118 sdk-core-protos/protos/api_upstream/openapi/openapiv3.yaml
+67 −0 sdk-core-protos/protos/api_upstream/temporal/api/activity/v1/message.proto
+47 −1 sdk-core-protos/protos/api_upstream/temporal/api/common/v1/message.proto
+6 −7 sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/event_type.proto
+2 −0 sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto
+5 −3 sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/reset.proto
+3 −3 sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/task_queue.proto
+14 −13 sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/update.proto
+1 −3 sdk-core-protos/protos/api_upstream/temporal/api/failure/v1/message.proto
+22 −0 sdk-core-protos/protos/api_upstream/temporal/api/history/v1/message.proto
+13 −2 sdk-core-protos/protos/api_upstream/temporal/api/nexus/v1/message.proto
+26 −6 sdk-core-protos/protos/api_upstream/temporal/api/operatorservice/v1/service.proto
+5 −0 sdk-core-protos/protos/api_upstream/temporal/api/schedule/v1/message.proto
+6 −0 sdk-core-protos/protos/api_upstream/temporal/api/sdk/v1/workflow_metadata.proto
+46 −12 sdk-core-protos/protos/api_upstream/temporal/api/taskqueue/v1/message.proto
+18 −19 sdk-core-protos/protos/api_upstream/temporal/api/update/v1/message.proto
+27 −0 sdk-core-protos/protos/api_upstream/temporal/api/workflow/v1/message.proto
+192 −19 sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto
+279 −12 sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/service.proto
+5 −0 sdk-core-protos/src/lib.rs
+3 −6 tests/integ_tests/metrics_tests.rs
6 changes: 5 additions & 1 deletion packages/core-bridge/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use temporal_sdk_core::{
ephemeral_server::EphemeralServer as CoreEphemeralServer,
init_replay_worker, init_worker,
replay::{HistoryForReplay, ReplayWorkerInput},
ClientOptions, CoreRuntime, RetryClient, WorkerConfig,
ClientOptions, CoreRuntime, RetryClient, TokioRuntimeBuilder, WorkerConfig,
};
use tokio::sync::{
mpsc::{channel, unbounded_channel, Sender, UnboundedReceiver, UnboundedSender},
Expand Down Expand Up @@ -126,6 +126,10 @@ pub fn start_bridge_loop(
tokio_builder.enable_all().thread_name("core");
let telem_opts = telemetry_options.0;
let meter_maker = telemetry_options.1;
let tokio_builder: TokioRuntimeBuilder<Box<dyn Fn() + Send + Sync>> = TokioRuntimeBuilder {
inner: tokio_builder,
lang_on_thread_start: None,
};
let mut core_runtime =
CoreRuntime::new(telem_opts, tokio_builder).expect("Failed to create CoreRuntime");

Expand Down

0 comments on commit 4daeafe

Please sign in to comment.