Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify run ID may not be current in ResetWorkflowExecutionRequest #473

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

bergundy
Copy link
Member

@bergundy bergundy commented Nov 5, 2024

No description provided.

@bergundy bergundy requested review from a team as code owners November 5, 2024 22:33
@@ -733,6 +733,9 @@ message SignalWithStartWorkflowExecutionResponse {

message ResetWorkflowExecutionRequest {
string namespace = 1;
// The workflow ID and optional run ID to reset to.
// The current run will be terminated upon request even if it has a different run ID than the one provided in this
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// The current run will be terminated upon request even if it has a different run ID than the one provided in this
// The current run will be terminated upon request if it has a different run ID than the one provided in this

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this wording is important because in both cases the current run will be terminated.

Copy link
Member

Choose a reason for hiding this comment

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

ah I see what you are saying. makes sense.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are we saying the following:

The provided workflow_task_finish_event_id will always be interpreted as addressing an event in the current workflow run, regardless of the presence or value of the run ID in the request?

Copy link
Contributor

@dandavison dandavison Nov 8, 2024

Choose a reason for hiding this comment

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

( moved this comment to apply to current code: https://github.com/temporalio/api/pull/473/files#r1834993098 )

@bergundy bergundy force-pushed the clarify-run-id-in-reset-request branch from 3dfb6bf to fed0036 Compare November 8, 2024 19:48
@@ -733,6 +733,9 @@ message SignalWithStartWorkflowExecutionResponse {

message ResetWorkflowExecutionRequest {
string namespace = 1;
// The workflow ID and optional run ID to reset to.
// The current run will be terminated even if it has a different run ID than the one provided in this
// request.
Copy link
Contributor

Choose a reason for hiding this comment

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

Presumably multiple runs might be terminated, if the request identifies a run far back in the chain?

Maybe some wording like the following?

The run identified by the request, and any subsequent runs, will be terminated by the reset, and a new run will be created that becomes the current run. If the request does not identify a run, then it is interpreted as identifying the current run.

Copy link
Member Author

Choose a reason for hiding this comment

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

Presumably multiple runs might be terminated, if the request identifies a run far back in the chain?

No, there can only be one current run. Only the current one will be terminated.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me know if that makes sense or you still want clarification.

Copy link
Contributor

Choose a reason for hiding this comment

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

Haha yes, what I said made zero sense.

It's not a big problem but I'm still finding it slightly unclear. Here's another attempt:

// The workflow to reset. If this contains a run ID then the workflow will be reset back to the
// provided event ID in that run. Otherwise it will be reset to the provided event ID in the
// current run. In all cases the current run will be terminated and a new run started.

@bergundy bergundy merged commit c787dce into temporalio:master Nov 12, 2024
3 checks passed
@bergundy bergundy deleted the clarify-run-id-in-reset-request branch November 12, 2024 22:59
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.

5 participants