Skip to content

Commit f474758

Browse files
committed
Merge branch 'main' into amazzeo/temporal-nexus-operation-handler-saa
2 parents 8d602d2 + d8675f5 commit f474758

45 files changed

Lines changed: 2097 additions & 765 deletions

Some content is hidden

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

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CHANGELOG.md merge=union

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!--
2+
High-level release notes.
3+
Loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
4+
5+
When your PR includes a user-facing change, add an entry below under the
6+
appropriate heading (create the heading if it does not yet exist). Within
7+
each heading content can be free-form. Feel free to include examples, links
8+
to docs, or any other relevant information.
9+
10+
### Added — new features
11+
### Changed — changes in existing functionality
12+
### Deprecated — soon-to-be-removed features
13+
### Breaking Changes — removed or backwards-incompatible features
14+
### Fixed — notable bug fixes
15+
### Security — notable security fixes
16+
-->
17+
18+
# Changelog
19+
20+
## [Unreleased]

CONTRIBUTING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Contributing to the Temporal Python SDK
2+
3+
Thanks for your interest in contributing!
4+
5+
All contributors must complete the Temporal Contributor License Agreement (CLA) before changes
6+
can be merged. A link to the CLA will be posted in the PR.
7+
8+
See the [README](README.md) for build and development instructions.
9+
10+
## Changelog
11+
12+
User-facing changes are recorded in [`CHANGELOG.md`](CHANGELOG.md), loosely following the
13+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format.
14+
15+
If your PR includes a user-facing change (new feature, behavior change, deprecation, breaking
16+
change, notable bug fix, or security fix), add a short, high-level entry to the `## [Unreleased]`
17+
section at the top of `CHANGELOG.md` under the appropriate heading, creating it if needed:
18+
Added, Changed, Deprecated, Breaking Changes, Fixed, or Security.
19+
20+
Keep entries high-level and written for users. The full commit log is appended at release time,
21+
so internal-only changes (refactors, tests, CI, docs) don't need an entry.

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",

0 commit comments

Comments
 (0)