Skip to content

Set request ID for SAA - #1761

Merged
Quinn-With-Two-Ns merged 2 commits into
temporalio:mainfrom
Quinn-With-Two-Ns:SDK-5802
Aug 18, 2026
Merged

Set request ID for SAA#1761
Quinn-With-Two-Ns merged 2 commits into
temporalio:mainfrom
Quinn-With-Two-Ns:SDK-5802

Conversation

@Quinn-With-Two-Ns

@Quinn-With-Two-Ns Quinn-With-Two-Ns commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

What was changed

Set request ID for SAA.

Why?

Set request ID for SAA so retried requests are not duplicate.

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

Note

Low Risk
Small client RPC field change with Nexus override preserved; low blast radius and covered by a focused unit test.

Overview
Standalone activity starts (Client.start_activity) now populate StartActivityExecutionRequest.request_id with a fresh UUIDv4 on each call, aligning with other client start RPCs and letting the server deduplicate retried StartActivityExecution calls instead of creating duplicate executions.

Nexus-backed activity starts still override that field via _apply_nexus_context_to_start_activity_request so retries across the Nexus boundary keep the inbound request ID. A unit test asserts each standalone start gets a valid, distinct request_id.

Reviewed by Cursor Bugbot for commit 28637d0. Bugbot is set up for automated code reviews on this repo. Configure here.

@Quinn-With-Two-Ns
Quinn-With-Two-Ns requested a review from a team as a code owner August 17, 2026 20:34
Comment thread tests/test_activity.py
service_client.workflow_service.start_activity_execution = start_activity_execution
client = Client(service_client)

for activity_id in ("activity-id-1", "activity-id-2"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit...

Suggested change
for activity_id in ("activity-id-1", "activity-id-2"):
for activity_id in ["activity-id-1", "activity-id-2"]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you have against tuples?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A tuple is for holding a collection of slots, each of which has a distinct meaning, such as (x_coord, y_coord) or (age, sex, height). This is just an iterable of homogeneously-typed values which should be represented as a list in python.

@Quinn-With-Two-Ns
Quinn-With-Two-Ns enabled auto-merge (squash) August 18, 2026 00:21
@Quinn-With-Two-Ns
Quinn-With-Two-Ns merged commit 8258413 into temporalio:main Aug 18, 2026
32 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants