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

Fix DeleteWorkflowExecution API when delete non current execution #2484

Merged

Conversation

alexshtin
Copy link
Member

@alexshtin alexshtin commented Feb 10, 2022

What changed?
Fix DeleteWorkflowExecution API when delete non current execution. Instead of calling internal updateWorkflow funcion, adding transfer task using new DeleteManager.AddDeleteWorkflowExecutionTask function which essentially just calls shard.AddTask.

Why?
Previous implementation worked only for current workflows.

How did you test it?
Integration test in another PR.

Potential risks
No risks.

Is hotfix candidate?
No.

@alexshtin alexshtin requested a review from a team as a code owner February 10, 2022 01:31
Copy link
Member

@yycptt yycptt left a comment

Choose a reason for hiding this comment

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

The proto change is not related to this pr?

service/history/workflow/delete_manager.go Show resolved Hide resolved
@@ -54,7 +53,7 @@ type (
) error
GenerateDeleteExecutionTask(
now time.Time,
) error
) (*tasks.DeleteExecutionTask, error)
Copy link
Member

Choose a reason for hiding this comment

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

return tasks.Task or []tasks.Task please.

Once queue refactor change is done, I am going to update all the generator methods to return the generated task, instead of adding it to ms directly.

Copy link
Member Author

Choose a reason for hiding this comment

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

"Depend on interface, return concrete type", right? Unless there is a good reason for exception.

Copy link
Member

Choose a reason for hiding this comment

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

Since we control the caller code and we can prevent them from being closely coupled, I don't really have a strong opinion here.

@alexshtin
Copy link
Member Author

I was sure I merged this PR already.

@alexshtin alexshtin force-pushed the feature/fix-delete-workflow-execution branch from a73eeeb to 0efa1eb Compare February 17, 2022 06:28
@alexshtin alexshtin merged commit cbd1b5e into temporalio:master Feb 17, 2022
@alexshtin alexshtin deleted the feature/fix-delete-workflow-execution branch February 17, 2022 17:01
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.

None yet

3 participants