-
Notifications
You must be signed in to change notification settings - Fork 19
Don't pass AllowNoPollers=true when unsetting current and ramping version #746
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
base: main
Are you sure you want to change the base?
Conversation
| DeploymentName: deploymentName, | ||
| Identity: "feature-deployment-deleter", | ||
| IgnoreMissingTaskQueues: true, | ||
| AllowNoPollers: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the change that actually avoided the error
| // Try using unversioned string (needed if deployment was very old) | ||
| _, err = client.WorkflowService().SetWorkerDeploymentCurrentVersion(ctx, &workflowservice.SetWorkerDeploymentCurrentVersionRequest{ | ||
| Namespace: ns, | ||
| DeploymentName: deploymentName, | ||
| Version: "__unversioned__", | ||
| BuildId: "__unversioned__", | ||
| Identity: "feature-deployment-deleter", | ||
| IgnoreMissingTaskQueues: true, | ||
| AllowNoPollers: true, | ||
| }) | ||
| if err != nil { | ||
| return fmt.Errorf("failed to unset current version for deployment %s: %w", deploymentName, err) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code is just not needed anymore, because all of the deployments in this test environment are new
|
|
||
| if err != nil { | ||
| return nil, err | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err was always nil here, so this was not doing anything
| // I observed this complete in 2 minutes 55 seconds when there were many Deployments | ||
| // to delete. If the deletions are happening frequently, this will likely be shorter. | ||
| // Giving a long timeout here to make sure it doesn't cause flakiness. | ||
| o.WorkflowExecutionTimeout = 5 * time.Minute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the next run completed in 279ms, so I think when there isn't much work to be done, this workflow completes quickly, but when there are many versions to delete, it takes a while. I think we should keep it at 5 minutes
What was changed
Don't pass AllowNoPollers=true when unsetting current and ramping version.
And remove unnecessary code that used deprecated version string field.
Why?
Setting AllowNoPollers=true causes the Deployment Client to call
update-with-startinstead of justupdate. In that code path, we verify that Build ID is not empty, because setting a version as current with no pollers creates a new version.This requires a bug fix in the server, but I don't think it needs to be a patch because it's unlikely people will hit this I think?
Checklist
Closes
How was this tested:
CI
Any docs updates needed?