Skip to content

Commit dd54bf2

Browse files
authored
Merge branch 'main' into feat/otel-histogram-bucket-overrides
2 parents db532d4 + 24badcf commit dd54bf2

43 files changed

Lines changed: 2216 additions & 764 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

scripts/gen_protos.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
re.compile(r"from protoc_gen_openapiv2\.").sub,
4444
r"from temporalio.api.dependencies.protoc_gen_openapiv2.",
4545
),
46+
partial(
47+
re.compile(r"from nexusannotations\.").sub,
48+
r"from temporalio.api.dependencies.nexusannotations.",
49+
),
4650
partial(
4751
re.compile(r"from temporal\.sdk\.core\.").sub, r"from temporalio.bridge.proto."
4852
),
@@ -58,6 +62,10 @@
5862
re.compile(r"protoc_gen_openapiv2\.").sub,
5963
r"temporalio.api.dependencies.protoc_gen_openapiv2.",
6064
),
65+
partial(
66+
re.compile(r"nexusannotations\.").sub,
67+
r"temporalio.api.dependencies.nexusannotations.",
68+
),
6169
partial(re.compile(r"temporal\.sdk\.core\.").sub, r"temporalio.bridge.proto."),
6270
]
6371

@@ -191,11 +199,12 @@ def generate_protos(output_dir: Path):
191199
grpc_file.unlink()
192200
# Apply fixes before moving code
193201
fix_generated_output(output_dir)
194-
# Move openapiv2 dependency protos
202+
# Move dependency protos
195203
deps_out_dir = api_out_dir / "dependencies"
196-
shutil.rmtree(deps_out_dir / "protoc_gen_openapiv2", ignore_errors=True)
197204
deps_out_dir.mkdir(exist_ok=True)
198-
(output_dir / "protoc_gen_openapiv2").replace(deps_out_dir / "protoc_gen_openapiv2")
205+
for dep in ["protoc_gen_openapiv2", "nexusannotations"]:
206+
shutil.rmtree(deps_out_dir / dep, ignore_errors=True)
207+
(output_dir / dep).replace(deps_out_dir / dep)
199208
(deps_out_dir / "__init__.py").touch()
200209
# Move protos
201210
for p in (output_dir / "temporal" / "api").iterdir():

temporalio/api/activity/v1/message_pb2.py

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

temporalio/api/activity/v1/message_pb2.pyi

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
207207
CANCELED_REASON_FIELD_NUMBER: builtins.int
208208
LINKS_FIELD_NUMBER: builtins.int
209209
TOTAL_HEARTBEAT_COUNT_FIELD_NUMBER: builtins.int
210+
SDK_NAME_FIELD_NUMBER: builtins.int
211+
SDK_VERSION_FIELD_NUMBER: builtins.int
212+
START_DELAY_FIELD_NUMBER: builtins.int
210213
activity_id: builtins.str
211214
"""Unique identifier of this activity within its namespace along with run ID (below)."""
212215
run_id: builtins.str
@@ -251,7 +254,9 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
251254
"""The retry policy for the activity. Will never exceed `schedule_to_close_timeout`."""
252255
@property
253256
def heartbeat_details(self) -> temporalio.api.common.v1.message_pb2.Payloads:
254-
"""Details provided in the last recorded activity heartbeat."""
257+
"""Details provided in the last recorded activity heartbeat.
258+
DescribeActivityExecution does not set this field unless include_heartbeat_details was true in the request.
259+
"""
255260
@property
256261
def last_heartbeat_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
257262
"""Time the last heartbeat was recorded."""
@@ -274,7 +279,9 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
274279
"""Time when the activity transitioned to a closed state."""
275280
@property
276281
def last_failure(self) -> temporalio.api.failure.v1.message_pb2.Failure:
277-
"""Failure details from the last failed attempt."""
282+
"""Failure details from the last failed attempt.
283+
DescribeActivityExecution does not set this field unless include_last_failure was true in the request.
284+
"""
278285
last_worker_identity: builtins.str
279286
@property
280287
def current_retry_interval(self) -> google.protobuf.duration_pb2.Duration:
@@ -327,6 +334,17 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
327334
"""Links to related entities, such as the entity that started this activity."""
328335
total_heartbeat_count: builtins.int
329336
"""Total number of heartbeats recorded across all attempts of this activity, including retries."""
337+
sdk_name: builtins.str
338+
"""The name of the SDK of the worker that most recently picked up an attempt of this activity.
339+
Overwritten on each new attempt. Empty if unknown.
340+
"""
341+
sdk_version: builtins.str
342+
"""The version of the SDK of the worker that most recently picked up an attempt of this activity.
343+
Overwritten on each new attempt. Empty if unknown.
344+
"""
345+
@property
346+
def start_delay(self) -> google.protobuf.duration_pb2.Duration:
347+
"""Time to wait before dispatching the first activity task. This delay is not applied to retry attempts."""
330348
def __init__(
331349
self,
332350
*,
@@ -370,6 +388,9 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
370388
links: collections.abc.Iterable[temporalio.api.common.v1.message_pb2.Link]
371389
| None = ...,
372390
total_heartbeat_count: builtins.int = ...,
391+
sdk_name: builtins.str = ...,
392+
sdk_version: builtins.str = ...,
393+
start_delay: google.protobuf.duration_pb2.Duration | None = ...,
373394
) -> None: ...
374395
def HasField(
375396
self,
@@ -414,6 +435,8 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
414435
b"schedule_to_start_timeout",
415436
"search_attributes",
416437
b"search_attributes",
438+
"start_delay",
439+
b"start_delay",
417440
"start_to_close_timeout",
418441
b"start_to_close_timeout",
419442
"user_metadata",
@@ -475,8 +498,14 @@ class ActivityExecutionInfo(google.protobuf.message.Message):
475498
b"schedule_to_close_timeout",
476499
"schedule_to_start_timeout",
477500
b"schedule_to_start_timeout",
501+
"sdk_name",
502+
b"sdk_name",
503+
"sdk_version",
504+
b"sdk_version",
478505
"search_attributes",
479506
b"search_attributes",
507+
"start_delay",
508+
b"start_delay",
480509
"start_to_close_timeout",
481510
b"start_to_close_timeout",
482511
"state_size_bytes",

temporalio/api/cloud/cloudservice/v1/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@
9393
GetRegionResponse,
9494
GetRegionsRequest,
9595
GetRegionsResponse,
96+
GetServiceAccountNamespaceAssignmentsRequest,
97+
GetServiceAccountNamespaceAssignmentsResponse,
9698
GetServiceAccountRequest,
9799
GetServiceAccountResponse,
98100
GetServiceAccountsRequest,
@@ -101,10 +103,14 @@
101103
GetUsageResponse,
102104
GetUserGroupMembersRequest,
103105
GetUserGroupMembersResponse,
106+
GetUserGroupNamespaceAssignmentsRequest,
107+
GetUserGroupNamespaceAssignmentsResponse,
104108
GetUserGroupRequest,
105109
GetUserGroupResponse,
106110
GetUserGroupsRequest,
107111
GetUserGroupsResponse,
112+
GetUserNamespaceAssignmentsRequest,
113+
GetUserNamespaceAssignmentsResponse,
108114
GetUserRequest,
109115
GetUserResponse,
110116
GetUsersRequest,
@@ -242,6 +248,8 @@
242248
"GetRegionResponse",
243249
"GetRegionsRequest",
244250
"GetRegionsResponse",
251+
"GetServiceAccountNamespaceAssignmentsRequest",
252+
"GetServiceAccountNamespaceAssignmentsResponse",
245253
"GetServiceAccountRequest",
246254
"GetServiceAccountResponse",
247255
"GetServiceAccountsRequest",
@@ -250,10 +258,14 @@
250258
"GetUsageResponse",
251259
"GetUserGroupMembersRequest",
252260
"GetUserGroupMembersResponse",
261+
"GetUserGroupNamespaceAssignmentsRequest",
262+
"GetUserGroupNamespaceAssignmentsResponse",
253263
"GetUserGroupRequest",
254264
"GetUserGroupResponse",
255265
"GetUserGroupsRequest",
256266
"GetUserGroupsResponse",
267+
"GetUserNamespaceAssignmentsRequest",
268+
"GetUserNamespaceAssignmentsResponse",
257269
"GetUserRequest",
258270
"GetUserResponse",
259271
"GetUsersRequest",

temporalio/api/cloud/cloudservice/v1/request_response_pb2.py

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

0 commit comments

Comments
 (0)