Skip to content
Merged
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
15 changes: 12 additions & 3 deletions scripts/gen_protos.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
re.compile(r"from protoc_gen_openapiv2\.").sub,
r"from temporalio.api.dependencies.protoc_gen_openapiv2.",
),
partial(
re.compile(r"from nexusannotations\.").sub,
r"from temporalio.api.dependencies.nexusannotations.",
),
partial(
re.compile(r"from temporal\.sdk\.core\.").sub, r"from temporalio.bridge.proto."
),
Expand All @@ -58,6 +62,10 @@
re.compile(r"protoc_gen_openapiv2\.").sub,
r"temporalio.api.dependencies.protoc_gen_openapiv2.",
),
partial(
re.compile(r"nexusannotations\.").sub,
r"temporalio.api.dependencies.nexusannotations.",
),
partial(re.compile(r"temporal\.sdk\.core\.").sub, r"temporalio.bridge.proto."),
]

Expand Down Expand Up @@ -191,11 +199,12 @@ def generate_protos(output_dir: Path):
grpc_file.unlink()
# Apply fixes before moving code
fix_generated_output(output_dir)
# Move openapiv2 dependency protos
# Move dependency protos
deps_out_dir = api_out_dir / "dependencies"
shutil.rmtree(deps_out_dir / "protoc_gen_openapiv2", ignore_errors=True)
deps_out_dir.mkdir(exist_ok=True)
(output_dir / "protoc_gen_openapiv2").replace(deps_out_dir / "protoc_gen_openapiv2")
for dep in ["protoc_gen_openapiv2", "nexusannotations"]:
shutil.rmtree(deps_out_dir / dep, ignore_errors=True)
(output_dir / dep).replace(deps_out_dir / dep)
(deps_out_dir / "__init__.py").touch()
# Move protos
for p in (output_dir / "temporal" / "api").iterdir():
Expand Down
20 changes: 10 additions & 10 deletions temporalio/api/activity/v1/message_pb2.py

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

33 changes: 31 additions & 2 deletions temporalio/api/activity/v1/message_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
CANCELED_REASON_FIELD_NUMBER: builtins.int
LINKS_FIELD_NUMBER: builtins.int
TOTAL_HEARTBEAT_COUNT_FIELD_NUMBER: builtins.int
SDK_NAME_FIELD_NUMBER: builtins.int
SDK_VERSION_FIELD_NUMBER: builtins.int
START_DELAY_FIELD_NUMBER: builtins.int
activity_id: builtins.str
"""Unique identifier of this activity within its namespace along with run ID (below)."""
run_id: builtins.str
Expand Down Expand Up @@ -251,7 +254,9 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
"""The retry policy for the activity. Will never exceed `schedule_to_close_timeout`."""
@property
def heartbeat_details(self) -> temporalio.api.common.v1.message_pb2.Payloads:
"""Details provided in the last recorded activity heartbeat."""
"""Details provided in the last recorded activity heartbeat.
DescribeActivityExecution does not set this field unless include_heartbeat_details was true in the request.
"""
@property
def last_heartbeat_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
"""Time the last heartbeat was recorded."""
Expand All @@ -274,7 +279,9 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
"""Time when the activity transitioned to a closed state."""
@property
def last_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure:
"""Failure details from the last failed attempt."""
"""Failure details from the last failed attempt.
DescribeActivityExecution does not set this field unless include_last_failure was true in the request.
"""
last_worker_identity: builtins.str
@property
def current_retry_interval(self) -> google.protobuf.duration_pb2.Duration:
Expand Down Expand Up @@ -327,6 +334,17 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
"""Links to related entities, such as the entity that started this activity."""
total_heartbeat_count: builtins.int
"""Total number of heartbeats recorded across all attempts of this activity, including retries."""
sdk_name: builtins.str
"""The name of the SDK of the worker that most recently picked up an attempt of this activity.
Overwritten on each new attempt. Empty if unknown.
"""
sdk_version: builtins.str
"""The version of the SDK of the worker that most recently picked up an attempt of this activity.
Overwritten on each new attempt. Empty if unknown.
"""
@property
def start_delay(self) -> google.protobuf.duration_pb2.Duration:
"""Time to wait before dispatching the first activity task. This delay is not applied to retry attempts."""
def __init__(
self,
*,
Expand Down Expand Up @@ -370,6 +388,9 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
links: collections.abc.Iterable[temporalio.api.common.v1.message_pb2.Link]
| None = ...,
total_heartbeat_count: builtins.int = ...,
sdk_name: builtins.str = ...,
sdk_version: builtins.str = ...,
start_delay: google.protobuf.duration_pb2.Duration | None = ...,
) -> None: ...
def HasField(
self,
Expand Down Expand Up @@ -414,6 +435,8 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
b"schedule_to_start_timeout",
"search_attributes",
b"search_attributes",
"start_delay",
b"start_delay",
"start_to_close_timeout",
b"start_to_close_timeout",
"user_metadata",
Expand Down Expand Up @@ -475,8 +498,14 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
b"schedule_to_close_timeout",
"schedule_to_start_timeout",
b"schedule_to_start_timeout",
"sdk_name",
b"sdk_name",
"sdk_version",
b"sdk_version",
"search_attributes",
b"search_attributes",
"start_delay",
b"start_delay",
"start_to_close_timeout",
b"start_to_close_timeout",
"state_size_bytes",
Expand Down
12 changes: 12 additions & 0 deletions temporalio/api/cloud/cloudservice/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@
GetRegionResponse,
GetRegionsRequest,
GetRegionsResponse,
GetServiceAccountNamespaceAssignmentsRequest,
GetServiceAccountNamespaceAssignmentsResponse,
GetServiceAccountRequest,
GetServiceAccountResponse,
GetServiceAccountsRequest,
Expand All @@ -101,10 +103,14 @@
GetUsageResponse,
GetUserGroupMembersRequest,
GetUserGroupMembersResponse,
GetUserGroupNamespaceAssignmentsRequest,
GetUserGroupNamespaceAssignmentsResponse,
GetUserGroupRequest,
GetUserGroupResponse,
GetUserGroupsRequest,
GetUserGroupsResponse,
GetUserNamespaceAssignmentsRequest,
GetUserNamespaceAssignmentsResponse,
GetUserRequest,
GetUserResponse,
GetUsersRequest,
Expand Down Expand Up @@ -242,6 +248,8 @@
"GetRegionResponse",
"GetRegionsRequest",
"GetRegionsResponse",
"GetServiceAccountNamespaceAssignmentsRequest",
"GetServiceAccountNamespaceAssignmentsResponse",
"GetServiceAccountRequest",
"GetServiceAccountResponse",
"GetServiceAccountsRequest",
Expand All @@ -250,10 +258,14 @@
"GetUsageResponse",
"GetUserGroupMembersRequest",
"GetUserGroupMembersResponse",
"GetUserGroupNamespaceAssignmentsRequest",
"GetUserGroupNamespaceAssignmentsResponse",
"GetUserGroupRequest",
"GetUserGroupResponse",
"GetUserGroupsRequest",
"GetUserGroupsResponse",
"GetUserNamespaceAssignmentsRequest",
"GetUserNamespaceAssignmentsResponse",
"GetUserRequest",
"GetUserResponse",
"GetUsersRequest",
Expand Down
100 changes: 99 additions & 1 deletion temporalio/api/cloud/cloudservice/v1/request_response_pb2.py

Large diffs are not rendered by default.

Loading
Loading