Skip to content

Commit e33fc8d

Browse files
chore: bump core (#1360)
* chore: bump core * chore: avoid mutating connection options * regen client rpc
1 parent 2acdadd commit e33fc8d

23 files changed

Lines changed: 1280 additions & 770 deletions

scripts/gen_bridge_client.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ def generate_rust_service_call(service_descriptor: ServiceDescriptor) -> str:
174174
call: RpcCall,
175175
) -> PyResult<Bound<'p, PyAny>> {
176176
self.runtime.assert_same_process("use client")?;
177-
use temporalio_client::${descriptor_name};
178-
let mut retry_client = self.retry_client.clone();
177+
use temporalio_client::grpc::${descriptor_name};
178+
let mut connection = self.connection.clone();
179179
self.runtime.future_into_py(py, async move {
180180
let bytes = match call.rpc.as_str() {
181181
$match_arms
@@ -203,26 +203,31 @@ def generate_rust_service_call(service_descriptor: ServiceDescriptor) -> str:
203203
if not method.client_streaming and not method.server_streaming
204204
]
205205

206+
service_method = pascal_to_snake(sanitized_service_name)
206207
match_arms = [
207-
generate_rust_match_arm(sanitized_service_name, method)
208+
generate_rust_match_arm(sanitized_service_name, service_method, method)
208209
for method in sorted(methods, key=lambda m: m.name)
209210
]
210211

211212
return call_template.substitute(
212-
service_name=pascal_to_snake(sanitized_service_name),
213+
service_name=service_method,
213214
descriptor_name=sanitized_service_name,
214215
match_arms="\n".join(match_arms),
215216
)
216217

217218

218-
def generate_rust_match_arm(trait_name: str, method: MethodDescriptor) -> str:
219+
def generate_rust_match_arm(
220+
trait_name: str, service_method: str, method: MethodDescriptor
221+
) -> str:
219222
match_template = Template("""\
220-
"$method_name" => {
221-
rpc_call!(retry_client, call, $trait_name, $method_name)
223+
"$method_name" => {
224+
rpc_call!(connection, call, $trait_name, $service_method, $method_name)
222225
}""")
223226

224227
return match_template.substitute(
225-
method_name=pascal_to_snake(method.name), trait_name=trait_name
228+
method_name=pascal_to_snake(method.name),
229+
trait_name=trait_name,
230+
service_method=service_method,
226231
)
227232

228233

temporalio/api/enums/v1/workflow_pb2.py

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

temporalio/api/enums/v1/workflow_pb2.pyi

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -557,12 +557,6 @@ class _SuggestContinueAsNewReasonEnumTypeWrapper(
557557
_SuggestContinueAsNewReason.ValueType
558558
) # 3
559559
"""Workflow's count of completed plus in-flight updates is too large."""
560-
SUGGEST_CONTINUE_AS_NEW_REASON_TARGET_WORKER_DEPLOYMENT_VERSION_CHANGED: (
561-
_SuggestContinueAsNewReason.ValueType
562-
) # 4
563-
"""Workflow's Target Worker Deployment Version is different from its
564-
Current Version and the workflow is versioned.
565-
"""
566560

567561
class SuggestContinueAsNewReason(
568562
_SuggestContinueAsNewReason, metaclass=_SuggestContinueAsNewReasonEnumTypeWrapper
@@ -582,10 +576,4 @@ SUGGEST_CONTINUE_AS_NEW_REASON_TOO_MANY_UPDATES: (
582576
SuggestContinueAsNewReason.ValueType
583577
) # 3
584578
"""Workflow's count of completed plus in-flight updates is too large."""
585-
SUGGEST_CONTINUE_AS_NEW_REASON_TARGET_WORKER_DEPLOYMENT_VERSION_CHANGED: (
586-
SuggestContinueAsNewReason.ValueType
587-
) # 4
588-
"""Workflow's Target Worker Deployment Version is different from its
589-
Current Version and the workflow is versioned.
590-
"""
591579
global___SuggestContinueAsNewReason = SuggestContinueAsNewReason

temporalio/api/history/v1/message_pb2.py

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

temporalio/api/history/v1/message_pb2.pyi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,7 @@ class WorkflowTaskStartedEventAttributes(google.protobuf.message.Message):
805805
REQUEST_ID_FIELD_NUMBER: builtins.int
806806
SUGGEST_CONTINUE_AS_NEW_FIELD_NUMBER: builtins.int
807807
SUGGEST_CONTINUE_AS_NEW_REASONS_FIELD_NUMBER: builtins.int
808+
TARGET_WORKER_DEPLOYMENT_VERSION_CHANGED_FIELD_NUMBER: builtins.int
808809
HISTORY_SIZE_BYTES_FIELD_NUMBER: builtins.int
809810
WORKER_VERSION_FIELD_NUMBER: builtins.int
810811
BUILD_ID_REDIRECT_COUNTER_FIELD_NUMBER: builtins.int
@@ -831,6 +832,11 @@ class WorkflowTaskStartedEventAttributes(google.protobuf.message.Message):
831832
"""The reason(s) that suggest_continue_as_new is true, if it is.
832833
Unset if suggest_continue_as_new is false.
833834
"""
835+
target_worker_deployment_version_changed: builtins.bool
836+
"""True if Workflow's Target Worker Deployment Version is different from its Pinned Version and
837+
the workflow is Pinned.
838+
Experimental.
839+
"""
834840
history_size_bytes: builtins.int
835841
"""Total history size in bytes, which the workflow might use to decide when to
836842
continue-as-new regardless of the suggestion. Note that history event count is
@@ -857,6 +863,7 @@ class WorkflowTaskStartedEventAttributes(google.protobuf.message.Message):
857863
temporalio.api.enums.v1.workflow_pb2.SuggestContinueAsNewReason.ValueType
858864
]
859865
| None = ...,
866+
target_worker_deployment_version_changed: builtins.bool = ...,
860867
history_size_bytes: builtins.int = ...,
861868
worker_version: temporalio.api.common.v1.message_pb2.WorkerVersionStamp
862869
| None = ...,
@@ -882,6 +889,8 @@ class WorkflowTaskStartedEventAttributes(google.protobuf.message.Message):
882889
b"suggest_continue_as_new",
883890
"suggest_continue_as_new_reasons",
884891
b"suggest_continue_as_new_reasons",
892+
"target_worker_deployment_version_changed",
893+
b"target_worker_deployment_version_changed",
885894
"worker_version",
886895
b"worker_version",
887896
],

0 commit comments

Comments
 (0)