Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions temporalio/api/history/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
ChildWorkflowExecutionStartedEventAttributes,
ChildWorkflowExecutionTerminatedEventAttributes,
ChildWorkflowExecutionTimedOutEventAttributes,
DeclinedTargetVersionUpgrade,
ExternalWorkflowExecutionCancelRequestedEventAttributes,
ExternalWorkflowExecutionSignaledEventAttributes,
History,
Expand Down Expand Up @@ -77,6 +78,7 @@
"ChildWorkflowExecutionStartedEventAttributes",
"ChildWorkflowExecutionTerminatedEventAttributes",
"ChildWorkflowExecutionTimedOutEventAttributes",
"DeclinedTargetVersionUpgrade",
"ExternalWorkflowExecutionCancelRequestedEventAttributes",
"ExternalWorkflowExecutionSignaledEventAttributes",
"History",
Expand Down
268 changes: 142 additions & 126 deletions temporalio/api/history/v1/message_pb2.py

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions temporalio/api/history/v1/message_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message):
INHERITED_PINNED_VERSION_FIELD_NUMBER: builtins.int
INHERITED_AUTO_UPGRADE_INFO_FIELD_NUMBER: builtins.int
EAGER_EXECUTION_ACCEPTED_FIELD_NUMBER: builtins.int
DECLINED_TARGET_VERSION_UPGRADE_FIELD_NUMBER: builtins.int
@property
def workflow_type(self) -> temporalio.api.common.v1.message_pb2.WorkflowType: ...
parent_workflow_namespace: builtins.str
Expand Down Expand Up @@ -286,6 +287,19 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message):
eager execution was accepted by the server.
Only populated by server with version >= 1.29.0.
"""
@property
def declined_target_version_upgrade(self) -> global___DeclinedTargetVersionUpgrade:
"""During a previous run of this workflow, the server may have notified the SDK
that the Target Worker Deployment Version changed, but the SDK declined to
upgrade (e.g., by continuing-as-new with PINNED behavior). This field records
the target version that was declined.

This is a wrapper message to distinguish "never declined" (nil wrapper) from
"declined an unversioned target" (non-nil wrapper with nil deployment_version).

Used internally by the server during continue-as-new and retry.
Should not be read or interpreted by SDKs.
"""
def __init__(
self,
*,
Expand Down Expand Up @@ -340,12 +354,16 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message):
inherited_auto_upgrade_info: temporalio.api.deployment.v1.message_pb2.InheritedAutoUpgradeInfo
| None = ...,
eager_execution_accepted: builtins.bool = ...,
declined_target_version_upgrade: global___DeclinedTargetVersionUpgrade
| None = ...,
) -> None: ...
def HasField(
self,
field_name: typing_extensions.Literal[
"continued_failure",
b"continued_failure",
"declined_target_version_upgrade",
b"declined_target_version_upgrade",
"first_workflow_task_backoff",
b"first_workflow_task_backoff",
"header",
Expand Down Expand Up @@ -403,6 +421,8 @@ class WorkflowExecutionStartedEventAttributes(google.protobuf.message.Message):
b"continued_failure",
"cron_schedule",
b"cron_schedule",
"declined_target_version_upgrade",
b"declined_target_version_upgrade",
"eager_execution_accepted",
b"eager_execution_accepted",
"first_execution_run_id",
Expand Down Expand Up @@ -476,6 +496,39 @@ global___WorkflowExecutionStartedEventAttributes = (
WorkflowExecutionStartedEventAttributes
)

class DeclinedTargetVersionUpgrade(google.protobuf.message.Message):
"""Wrapper for a target deployment version that the SDK declined to upgrade to.
See declined_target_version_upgrade on WorkflowExecutionStartedEventAttributes.
"""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int
@property
def deployment_version(
self,
) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion: ...
def __init__(
self,
*,
deployment_version: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion
| None = ...,
) -> None: ...
def HasField(
self,
field_name: typing_extensions.Literal[
"deployment_version", b"deployment_version"
],
) -> builtins.bool: ...
def ClearField(
self,
field_name: typing_extensions.Literal[
"deployment_version", b"deployment_version"
],
) -> None: ...

global___DeclinedTargetVersionUpgrade = DeclinedTargetVersionUpgrade

class WorkflowExecutionCompletedEventAttributes(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

Expand Down
4 changes: 4 additions & 0 deletions temporalio/api/worker/v1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
from .message_pb2 import (
PluginInfo,
StorageDriverInfo,
WorkerHeartbeat,
WorkerHostInfo,
WorkerInfo,
WorkerListInfo,
WorkerPollerInfo,
WorkerSlotsInfo,
)

__all__ = [
"PluginInfo",
"StorageDriverInfo",
"WorkerHeartbeat",
"WorkerHostInfo",
"WorkerInfo",
"WorkerListInfo",
"WorkerPollerInfo",
"WorkerSlotsInfo",
]
40 changes: 34 additions & 6 deletions temporalio/api/worker/v1/message_pb2.py

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

Loading
Loading