Skip to content

Conversation

@carlydf
Copy link

@carlydf carlydf commented Feb 3, 2026

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-start instead of just update. 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

  1. Closes

  2. How was this tested:
    CI

  3. Any docs updates needed?

@carlydf carlydf requested a review from a team as a code owner February 3, 2026 20:26
DeploymentName: deploymentName,
Identity: "feature-deployment-deleter",
IgnoreMissingTaskQueues: true,
AllowNoPollers: true,
Copy link
Author

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

Comment on lines -93 to -105
// 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)
}
Copy link
Author

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

Comment on lines -63 to -66

if err != nil {
return nil, err
}
Copy link
Author

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

@carlydf carlydf changed the title Don't use deprecated version string in cleanup Don't pass AllowNoPollers=true when unsetting current and ramping version Feb 3, 2026
Comment on lines +26 to +29
// 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
Copy link
Author

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

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.

2 participants