Skip to content

Commit adb3e3b

Browse files
committed
Adjust to proto changes
1 parent a137572 commit adb3e3b

15 files changed

Lines changed: 256 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: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,18 +573,45 @@ 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!(
578+
client,
579+
call,
580+
WorkflowService,
581+
count_nexus_operation_executions
582+
)
583+
}
576584
"CountSchedules" => rpc_call_on_trait!(client, call, WorkflowService, count_schedules),
577585
"CountWorkflowExecutions" => {
578586
rpc_call_on_trait!(client, call, WorkflowService, count_workflow_executions)
579587
}
580588
"CreateSchedule" => rpc_call_on_trait!(client, call, WorkflowService, create_schedule),
589+
"CreateWorkerDeployment" => {
590+
rpc_call_on_trait!(client, call, WorkflowService, create_worker_deployment)
591+
}
592+
"CreateWorkerDeploymentVersion" => {
593+
rpc_call_on_trait!(
594+
client,
595+
call,
596+
WorkflowService,
597+
create_worker_deployment_version
598+
)
599+
}
581600
"CreateWorkflowRule" => {
582601
rpc_call_on_trait!(client, call, WorkflowService, create_workflow_rule)
583602
}
584603
"DeleteSchedule" => rpc_call_on_trait!(client, call, WorkflowService, delete_schedule),
585604
"DeleteActivityExecution" => {
586605
rpc_call_on_trait!(client, call, WorkflowService, delete_activity_execution)
587606
}
607+
"DeleteNexusOperationExecution" => {
608+
rpc_call_on_trait!(
609+
client,
610+
call,
611+
WorkflowService,
612+
delete_nexus_operation_execution
613+
)
614+
}
588615
"DeleteWorkerDeployment" => {
589616
rpc_call_on_trait!(client, call, WorkflowService, delete_worker_deployment)
590617
}
@@ -617,6 +644,14 @@ async fn call_workflow_service(
617644
"DescribeNamespace" => {
618645
rpc_call_on_trait!(client, call, WorkflowService, describe_namespace)
619646
}
647+
"DescribeNexusOperationExecution" => {
648+
rpc_call_on_trait!(
649+
client,
650+
call,
651+
WorkflowService,
652+
describe_nexus_operation_execution
653+
)
654+
}
620655
"DescribeSchedule" => rpc_call_on_trait!(client, call, WorkflowService, describe_schedule),
621656
"DescribeTaskQueue" => {
622657
rpc_call_on_trait!(client, call, WorkflowService, describe_task_queue)
@@ -708,6 +743,14 @@ async fn call_workflow_service(
708743
),
709744
"ListDeployments" => rpc_call_on_trait!(client, call, WorkflowService, list_deployments),
710745
"ListNamespaces" => rpc_call_on_trait!(client, call, WorkflowService, list_namespaces),
746+
"ListNexusOperationExecutions" => {
747+
rpc_call_on_trait!(
748+
client,
749+
call,
750+
WorkflowService,
751+
list_nexus_operation_executions
752+
)
753+
}
711754
"ListOpenWorkflowExecutions" => {
712755
rpc_call_on_trait!(client, call, WorkflowService, list_open_workflow_executions)
713756
}
@@ -739,6 +782,14 @@ async fn call_workflow_service(
739782
"PollActivityTaskQueue" => {
740783
rpc_call_on_trait!(client, call, WorkflowService, poll_activity_task_queue)
741784
}
785+
"PollNexusOperationExecution" => {
786+
rpc_call_on_trait!(
787+
client,
788+
call,
789+
WorkflowService,
790+
poll_nexus_operation_execution
791+
)
792+
}
742793
"PollNexusTaskQueue" => {
743794
rpc_call_on_trait!(client, call, WorkflowService, poll_nexus_task_queue)
744795
}
@@ -780,6 +831,14 @@ async fn call_workflow_service(
780831
request_cancel_activity_execution
781832
)
782833
}
834+
"RequestCancelNexusOperationExecution" => {
835+
rpc_call_on_trait!(
836+
client,
837+
call,
838+
WorkflowService,
839+
request_cancel_nexus_operation_execution
840+
)
841+
}
783842
"RequestCancelWorkflowExecution" => {
784843
rpc_call_on_trait!(
785844
client,
@@ -895,6 +954,14 @@ async fn call_workflow_service(
895954
"StartBatchOperation" => {
896955
rpc_call_on_trait!(client, call, WorkflowService, start_batch_operation)
897956
}
957+
"StartNexusOperationExecution" => {
958+
rpc_call_on_trait!(
959+
client,
960+
call,
961+
WorkflowService,
962+
start_nexus_operation_execution
963+
)
964+
}
898965
"StartWorkflowExecution" => {
899966
rpc_call_on_trait!(client, call, WorkflowService, start_workflow_execution)
900967
}
@@ -904,6 +971,14 @@ async fn call_workflow_service(
904971
"TerminateActivityExecution" => {
905972
rpc_call_on_trait!(client, call, WorkflowService, terminate_activity_execution)
906973
}
974+
"TerminateNexusOperationExecution" => {
975+
rpc_call_on_trait!(
976+
client,
977+
call,
978+
WorkflowService,
979+
terminate_nexus_operation_execution
980+
)
981+
}
907982
"TerminateWorkflowExecution" => {
908983
rpc_call_on_trait!(client, call, WorkflowService, terminate_workflow_execution)
909984
}
@@ -927,6 +1002,14 @@ async fn call_workflow_service(
9271002
"UpdateWorkerConfig" => {
9281003
rpc_call_on_trait!(client, call, WorkflowService, update_worker_config)
9291004
}
1005+
"UpdateWorkerDeploymentVersionComputeConfig" => {
1006+
rpc_call_on_trait!(
1007+
client,
1008+
call,
1009+
WorkflowService,
1010+
update_worker_deployment_version_compute_config
1011+
)
1012+
}
9301013
"UpdateWorkerDeploymentVersionMetadata" => {
9311014
rpc_call_on_trait!(
9321015
client,
@@ -960,6 +1043,14 @@ async fn call_workflow_service(
9601043
update_worker_build_id_compatibility
9611044
)
9621045
}
1046+
"ValidateWorkerDeploymentVersionComputeConfig" => {
1047+
rpc_call_on_trait!(
1048+
client,
1049+
call,
1050+
WorkflowService,
1051+
validate_worker_deployment_version_compute_config
1052+
)
1053+
}
9631054
rpc => Err(anyhow::anyhow!("Unknown RPC call {rpc}")),
9641055
}
9651056
}

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)