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

DeleteExecutions workflow: pass nextPageToken with ContinueAsNewError #3966

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

alexshtin
Copy link
Member

What changed?
DeleteExecutions workflow: pass nextPageToken with ContinueAsNewError.

Why?
To prevent DeleteExecutions workflow to start from the begining with every "continue as new" iteration.

How did you test it?
Modified existing test.

Potential risks
No risks.

Is hotfix candidate?
No.

@alexshtin alexshtin requested a review from a team as a code owner February 16, 2023 21:30
@@ -186,6 +187,7 @@ func DeleteExecutionsWorkflow(ctx workflow.Context, params DeleteExecutionsParam
params.PreviousSuccessCount = result.SuccessCount
params.PreviousErrorCount = result.ErrorCount
params.ContinueAsNewCount++
params.NextPageToken = nextPageToken

logger.Info("There are more workflows to delete. Continuing workflow as new.", tag.WorkflowType(WorkflowName), tag.WorkflowNamespace(params.Namespace.String()), tag.DeletedExecutionsCount(result.SuccessCount), tag.DeletedExecutionsErrorCount(result.ErrorCount), tag.Counter(params.ContinueAsNewCount))
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think workflow execution history is good enough so this logging is not really needed.

@alexshtin alexshtin merged commit f9bd5b0 into temporalio:master Feb 16, 2023
@alexshtin alexshtin deleted the fix/delete-ns-pass-token branch February 16, 2023 23:22
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.

3 participants