Add request IDs to activity update, unpause, and reset - #844
Conversation
| // 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; |
There was a problem hiding this comment.
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
| // 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; |
There was a problem hiding this comment.
yea it's hard to explain a corner in a field doc. I'll simplify
| // 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. |
There was a problem hiding this comment.
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.
| // 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. |
There was a problem hiding this comment.
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"?
| // Used to de-dupe update requests within the targeted execution. | |
| // Used to de-dupe update requests. |
There was a problem hiding this comment.
Related to clarifying a corner as state in RunID above. I'll simplify
| // Used to de-dupe pause requests. | ||
| // Used to de-dupe pause requests within the targeted execution. |
There was a problem hiding this comment.
As above, I vote we keep it simple
// Used to de-dupe pause requests.
| // 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. |
| // 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. |
There was a problem hiding this comment.
| // 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
There was a problem hiding this comment.
same comments apply below
662b26d to
bbac65a
Compare
| 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. |
There was a problem hiding this comment.
For consistency, do you want to remove the "Specify a run ID to avoid retrying ...." from RequestCancel and Terminate?
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.