Skip to content

Commit 1d03963

Browse files
committed
Adjust to proto changes
1 parent 1159737 commit 1d03963

15 files changed

Lines changed: 216 additions & 4 deletions

File tree

crates/client/src/grpc.rs

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,6 +1582,114 @@ proxier! {
15821582
r.extensions_mut().insert(labels);
15831583
}
15841584
);
1585+
(
1586+
count_nexus_operation_executions,
1587+
CountNexusOperationExecutionsRequest,
1588+
CountNexusOperationExecutionsResponse,
1589+
|r| {
1590+
let labels = namespaced_request!(r);
1591+
r.extensions_mut().insert(labels);
1592+
}
1593+
);
1594+
(
1595+
create_worker_deployment,
1596+
CreateWorkerDeploymentRequest,
1597+
CreateWorkerDeploymentResponse,
1598+
|r| {
1599+
let labels = namespaced_request!(r);
1600+
r.extensions_mut().insert(labels);
1601+
}
1602+
);
1603+
(
1604+
create_worker_deployment_version,
1605+
CreateWorkerDeploymentVersionRequest,
1606+
CreateWorkerDeploymentVersionResponse,
1607+
|r| {
1608+
let labels = namespaced_request!(r);
1609+
r.extensions_mut().insert(labels);
1610+
}
1611+
);
1612+
(
1613+
delete_nexus_operation_execution,
1614+
DeleteNexusOperationExecutionRequest,
1615+
DeleteNexusOperationExecutionResponse,
1616+
|r| {
1617+
let labels = namespaced_request!(r);
1618+
r.extensions_mut().insert(labels);
1619+
}
1620+
);
1621+
(
1622+
describe_nexus_operation_execution,
1623+
DescribeNexusOperationExecutionRequest,
1624+
DescribeNexusOperationExecutionResponse,
1625+
|r| {
1626+
let labels = namespaced_request!(r);
1627+
r.extensions_mut().insert(labels);
1628+
}
1629+
);
1630+
(
1631+
list_nexus_operation_executions,
1632+
ListNexusOperationExecutionsRequest,
1633+
ListNexusOperationExecutionsResponse,
1634+
|r| {
1635+
let labels = namespaced_request!(r);
1636+
r.extensions_mut().insert(labels);
1637+
}
1638+
);
1639+
(
1640+
poll_nexus_operation_execution,
1641+
PollNexusOperationExecutionRequest,
1642+
PollNexusOperationExecutionResponse,
1643+
|r| {
1644+
let labels = namespaced_request!(r);
1645+
r.extensions_mut().insert(labels);
1646+
}
1647+
);
1648+
(
1649+
request_cancel_nexus_operation_execution,
1650+
RequestCancelNexusOperationExecutionRequest,
1651+
RequestCancelNexusOperationExecutionResponse,
1652+
|r| {
1653+
let labels = namespaced_request!(r);
1654+
r.extensions_mut().insert(labels);
1655+
}
1656+
);
1657+
(
1658+
start_nexus_operation_execution,
1659+
StartNexusOperationExecutionRequest,
1660+
StartNexusOperationExecutionResponse,
1661+
|r| {
1662+
let labels = namespaced_request!(r);
1663+
r.extensions_mut().insert(labels);
1664+
}
1665+
);
1666+
(
1667+
terminate_nexus_operation_execution,
1668+
TerminateNexusOperationExecutionRequest,
1669+
TerminateNexusOperationExecutionResponse,
1670+
|r| {
1671+
let labels = namespaced_request!(r);
1672+
r.extensions_mut().insert(labels);
1673+
}
1674+
);
1675+
(
1676+
update_worker_deployment_version_compute_config,
1677+
UpdateWorkerDeploymentVersionComputeConfigRequest,
1678+
UpdateWorkerDeploymentVersionComputeConfigResponse,
1679+
|r| {
1680+
let labels = namespaced_request!(r);
1681+
r.extensions_mut().insert(labels);
1682+
}
1683+
);
1684+
(
1685+
validate_worker_deployment_version_compute_config,
1686+
ValidateWorkerDeploymentVersionComputeConfigRequest,
1687+
ValidateWorkerDeploymentVersionComputeConfigResponse,
1688+
|r| {
1689+
let labels = namespaced_request!(r);
1690+
r.extensions_mut().insert(labels);
1691+
}
1692+
);
15851693
}
15861694

15871695
proxier! {

crates/common/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ const SERDE_DERIVE_PREFIXES: &[&str] = &[
3030
".grpc",
3131
".temporal.api.activity",
3232
".temporal.api.batch",
33+
".temporal.api.callback",
3334
".temporal.api.cloud",
3435
".temporal.api.command",
36+
".temporal.api.compute",
3537
".temporal.api.deployment",
3638
".temporal.api.filter",
3739
".temporal.api.history",

crates/common/src/protos/history_builder.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,10 @@ impl TestHistoryBuilder {
377377
stack_trace: "".to_string(),
378378
cause: None,
379379
failure_info: Some(failure::FailureInfo::CanceledFailureInfo(
380-
CanceledFailureInfo { details: None },
380+
CanceledFailureInfo {
381+
details: None,
382+
identity: Default::default(),
383+
},
381384
)),
382385
encoded_attributes: Default::default(),
383386
}),

crates/common/src/protos/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ pub mod coresdk {
315315
failure_info: Some(failure::FailureInfo::CanceledFailureInfo(
316316
CanceledFailureInfo {
317317
details: details.map(Into::into),
318+
identity: Default::default(),
318319
},
319320
)),
320321
..Default::default()
@@ -1654,6 +1655,11 @@ pub mod temporal {
16541655
tonic::include_proto!("temporal.api.batch.v1");
16551656
}
16561657
}
1658+
pub mod callback {
1659+
pub mod v1 {
1660+
tonic::include_proto!("temporal.api.callback.v1");
1661+
}
1662+
}
16571663
pub mod command {
16581664
pub mod v1 {
16591665
tonic::include_proto!("temporal.api.command.v1");
@@ -2180,6 +2186,11 @@ pub mod temporal {
21802186
}
21812187
}
21822188
}
2189+
pub mod compute {
2190+
pub mod v1 {
2191+
tonic::include_proto!("temporal.api.compute.v1");
2192+
}
2193+
}
21832194
pub mod deployment {
21842195
pub mod v1 {
21852196
tonic::include_proto!("temporal.api.deployment.v1");
@@ -2414,6 +2425,8 @@ pub mod temporal {
24142425
Attributes::WorkflowExecutionPausedEventAttributes(_) => true,
24152426
// !! Ignorable !!
24162427
Attributes::WorkflowExecutionUnpausedEventAttributes(_) => true,
2428+
// !! Ignorable !!
2429+
Attributes::WorkflowExecutionTimeSkippingTransitionedEventAttributes(_) => true,
24172430
}
24182431
} else {
24192432
false
@@ -2495,6 +2508,7 @@ pub mod temporal {
24952508
Attributes::NexusOperationCancelRequestFailedEventAttributes(_) => { EventType::NexusOperationCancelRequestFailed }
24962509
Attributes::WorkflowExecutionPausedEventAttributes(_) => { EventType::WorkflowExecutionPaused }
24972510
Attributes::WorkflowExecutionUnpausedEventAttributes(_) => { EventType::WorkflowExecutionUnpaused }
2511+
Attributes::WorkflowExecutionTimeSkippingTransitionedEventAttributes(_) => { EventType::WorkflowExecutionTimeSkippingTransitioned }
24982512
}
24992513
}
25002514
}

crates/sdk-core-c-bridge/src/client.rs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,18 +573,30 @@ async fn call_workflow_service(
573573
"CountActivityExecutions" => {
574574
rpc_call_on_trait!(client, call, WorkflowService, count_activity_executions)
575575
}
576+
"CountNexusOperationExecutions" => {
577+
rpc_call_on_trait!(client, call, WorkflowService, count_nexus_operation_executions)
578+
}
576579
"CountSchedules" => rpc_call_on_trait!(client, call, WorkflowService, count_schedules),
577580
"CountWorkflowExecutions" => {
578581
rpc_call_on_trait!(client, call, WorkflowService, count_workflow_executions)
579582
}
580583
"CreateSchedule" => rpc_call_on_trait!(client, call, WorkflowService, create_schedule),
584+
"CreateWorkerDeployment" => {
585+
rpc_call_on_trait!(client, call, WorkflowService, create_worker_deployment)
586+
}
587+
"CreateWorkerDeploymentVersion" => {
588+
rpc_call_on_trait!(client, call, WorkflowService, create_worker_deployment_version)
589+
}
581590
"CreateWorkflowRule" => {
582591
rpc_call_on_trait!(client, call, WorkflowService, create_workflow_rule)
583592
}
584593
"DeleteSchedule" => rpc_call_on_trait!(client, call, WorkflowService, delete_schedule),
585594
"DeleteActivityExecution" => {
586595
rpc_call_on_trait!(client, call, WorkflowService, delete_activity_execution)
587596
}
597+
"DeleteNexusOperationExecution" => {
598+
rpc_call_on_trait!(client, call, WorkflowService, delete_nexus_operation_execution)
599+
}
588600
"DeleteWorkerDeployment" => {
589601
rpc_call_on_trait!(client, call, WorkflowService, delete_worker_deployment)
590602
}
@@ -617,6 +629,9 @@ async fn call_workflow_service(
617629
"DescribeNamespace" => {
618630
rpc_call_on_trait!(client, call, WorkflowService, describe_namespace)
619631
}
632+
"DescribeNexusOperationExecution" => {
633+
rpc_call_on_trait!(client, call, WorkflowService, describe_nexus_operation_execution)
634+
}
620635
"DescribeSchedule" => rpc_call_on_trait!(client, call, WorkflowService, describe_schedule),
621636
"DescribeTaskQueue" => {
622637
rpc_call_on_trait!(client, call, WorkflowService, describe_task_queue)
@@ -708,6 +723,9 @@ async fn call_workflow_service(
708723
),
709724
"ListDeployments" => rpc_call_on_trait!(client, call, WorkflowService, list_deployments),
710725
"ListNamespaces" => rpc_call_on_trait!(client, call, WorkflowService, list_namespaces),
726+
"ListNexusOperationExecutions" => {
727+
rpc_call_on_trait!(client, call, WorkflowService, list_nexus_operation_executions)
728+
}
711729
"ListOpenWorkflowExecutions" => {
712730
rpc_call_on_trait!(client, call, WorkflowService, list_open_workflow_executions)
713731
}
@@ -739,6 +757,9 @@ async fn call_workflow_service(
739757
"PollActivityTaskQueue" => {
740758
rpc_call_on_trait!(client, call, WorkflowService, poll_activity_task_queue)
741759
}
760+
"PollNexusOperationExecution" => {
761+
rpc_call_on_trait!(client, call, WorkflowService, poll_nexus_operation_execution)
762+
}
742763
"PollNexusTaskQueue" => {
743764
rpc_call_on_trait!(client, call, WorkflowService, poll_nexus_task_queue)
744765
}
@@ -780,6 +801,14 @@ async fn call_workflow_service(
780801
request_cancel_activity_execution
781802
)
782803
}
804+
"RequestCancelNexusOperationExecution" => {
805+
rpc_call_on_trait!(
806+
client,
807+
call,
808+
WorkflowService,
809+
request_cancel_nexus_operation_execution
810+
)
811+
}
783812
"RequestCancelWorkflowExecution" => {
784813
rpc_call_on_trait!(
785814
client,
@@ -895,6 +924,9 @@ async fn call_workflow_service(
895924
"StartBatchOperation" => {
896925
rpc_call_on_trait!(client, call, WorkflowService, start_batch_operation)
897926
}
927+
"StartNexusOperationExecution" => {
928+
rpc_call_on_trait!(client, call, WorkflowService, start_nexus_operation_execution)
929+
}
898930
"StartWorkflowExecution" => {
899931
rpc_call_on_trait!(client, call, WorkflowService, start_workflow_execution)
900932
}
@@ -904,6 +936,9 @@ async fn call_workflow_service(
904936
"TerminateActivityExecution" => {
905937
rpc_call_on_trait!(client, call, WorkflowService, terminate_activity_execution)
906938
}
939+
"TerminateNexusOperationExecution" => {
940+
rpc_call_on_trait!(client, call, WorkflowService, terminate_nexus_operation_execution)
941+
}
907942
"TerminateWorkflowExecution" => {
908943
rpc_call_on_trait!(client, call, WorkflowService, terminate_workflow_execution)
909944
}
@@ -927,6 +962,14 @@ async fn call_workflow_service(
927962
"UpdateWorkerConfig" => {
928963
rpc_call_on_trait!(client, call, WorkflowService, update_worker_config)
929964
}
965+
"UpdateWorkerDeploymentVersionComputeConfig" => {
966+
rpc_call_on_trait!(
967+
client,
968+
call,
969+
WorkflowService,
970+
update_worker_deployment_version_compute_config
971+
)
972+
}
930973
"UpdateWorkerDeploymentVersionMetadata" => {
931974
rpc_call_on_trait!(
932975
client,
@@ -960,6 +1003,14 @@ async fn call_workflow_service(
9601003
update_worker_build_id_compatibility
9611004
)
9621005
}
1006+
"ValidateWorkerDeploymentVersionComputeConfig" => {
1007+
rpc_call_on_trait!(
1008+
client,
1009+
call,
1010+
WorkflowService,
1011+
validate_worker_deployment_version_compute_config
1012+
)
1013+
}
9631014
rpc => Err(anyhow::anyhow!("Unknown RPC call {rpc}")),
9641015
}
9651016
}

crates/sdk-core/src/core_tests/workers.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@ fn create_test_nexus_task(
436436
)),
437437
}),
438438
poller_scaling_decision: None,
439+
poller_group_id: Default::default(),
440+
poller_group_infos: vec![],
439441
}
440442
}
441443

@@ -1068,6 +1070,7 @@ async fn nexus_start_operation_failure_with_canceled_failure_info() {
10681070
message: "operation canceled".to_string(),
10691071
failure_info: Some(FailureInfo::CanceledFailureInfo(CanceledFailureInfo {
10701072
details: None,
1073+
identity: Default::default(),
10711074
})),
10721075
..Default::default()
10731076
},
@@ -1147,6 +1150,7 @@ async fn nexus_start_operation_failure_with_invalid_failure_info(
11471150
#[case::canceled_failure(
11481151
FailureInfo::CanceledFailureInfo(CanceledFailureInfo {
11491152
details: None,
1153+
identity: Default::default(),
11501154
}),
11511155
NexusOperationErrorState::Canceled
11521156
)]

crates/sdk-core/src/worker/activities.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ impl WorkerActivityTasks {
393393
failure_info:
394394
Some(FailureInfo::CanceledFailureInfo(CanceledFailureInfo {
395395
details,
396+
..
396397
})),
397398
..
398399
}) = failure

0 commit comments

Comments
 (0)