Skip to content

Add request IDs to activity update, unpause, and reset - #844

Merged
fretz12 merged 6 commits into
mainfrom
fredtzeng/saa-req-id
Jul 30, 2026
Merged

Add request IDs to activity update, unpause, and reset#844
fretz12 merged 6 commits into
mainfrom
fredtzeng/saa-req-id

Conversation

@fretz12

@fretz12 fretz12 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

What changed?
Added request_id fields to update, unpause, and reset activity execution requests. Also clarified the run_id and request_id documentation for related activity APIs, including how omitted run IDs affect targeting and how request IDs are scoped to targeted executions.

Why?
To support idempotent retries within the targeted activity execution, prevent duplicate mutations after ambiguous timeouts or failures, and make run-targeting and request-deduplication behavior clearer to API users.

@fretz12
fretz12 requested review from a team, dandavison, maciejdudko and spkane31 July 29, 2026 20:33
Comment on lines +2186 to 2189
// Run ID of the workflow or standalone activity. If empty, targets the latest run.
// For standalone activities, specify a run ID to avoid retrying a different
// execution when the activity ID is reused.
string run_id = 4;

@dandavison dandavison Jul 29, 2026

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.

I think it's hard to explain and the comment risks making it more confusing, not less. (what is "retrying"?) I vote we just follow SANO and keep it to

Suggested change
// Run ID of the workflow or standalone activity. If empty, targets the latest run.
// For standalone activities, specify a run ID to avoid retrying a different
// execution when the activity ID is reused.
string run_id = 4;
// Run ID of the workflow or standalone activity. If empty, targets the latest run.
string run_id = 4;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yea it's hard to explain a corner in a field doc. I'll simplify

Comment on lines +2256 to +2263
// Run ID of the workflow or standalone activity.
// Run ID of the workflow or standalone activity. If empty, targets the latest run.
// For standalone activities, specify a run ID to avoid retrying a different
// execution when the activity ID is reused.

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.

As above, I vote we follow SANO and leave it at

// Run ID of the workflow or standalone activity. If empty, targets the latest run.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

// Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities.
string resource_id = 9;

// Used to de-dupe update requests within the targeted execution.

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.

I can't think of a reason to say "within the targeted execution". How would a user be going wrong if they read "Used to de-dupe update requests"?

Suggested change
// Used to de-dupe update requests within the targeted execution.
// Used to de-dupe update requests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Related to clarifying a corner as state in RunID above. I'll simplify

Comment on lines +2268 to +2275
// Used to de-dupe pause requests.
// Used to de-dupe pause requests within the targeted execution.

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.

As above, I vote we keep it simple

// Used to de-dupe pause requests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

// Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities.
string resource_id = 10;

// Used to de-dupe unpause requests within the targeted execution.

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.

ditto

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines +2404 to +2406
// Run ID of the workflow or standalone activity. If empty, targets the latest run.
// For standalone activities, specify a run ID to avoid retrying a different
// execution when the activity ID is reused.

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.

Suggested change
// Run ID of the workflow or standalone activity. If empty, targets the latest run.
// For standalone activities, specify a run ID to avoid retrying a different
// execution when the activity ID is reused.
// Run ID of the workflow or standalone activity. If empty, targets the latest run.

ditto

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.

same comments apply below

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@fretz12
fretz12 force-pushed the fredtzeng/saa-req-id branch from 662b26d to bbac65a Compare July 29, 2026 21:46
string namespace = 1;
string activity_id = 2;
// Activity run ID, targets the latest run if run_id is empty.
// Activity run ID. If empty, targets the latest run.

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.

For consistency, do you want to remove the "Specify a run ID to avoid retrying ...." from RequestCancel and Terminate?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed, removed

@fretz12
fretz12 enabled auto-merge (squash) July 30, 2026 20:33
@fretz12
fretz12 merged commit 13d5963 into main Jul 30, 2026
4 checks passed
@fretz12
fretz12 deleted the fredtzeng/saa-req-id branch July 30, 2026 20:36
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