Skip to content

Conversation

@carlydf
Copy link
Collaborator

@carlydf carlydf commented Sep 24, 2025

What was changed?

Only Delete Deployments of NotRegistered versions if TemporalState is non-empty

Why?

TemporalState can be empty on the initial rollout of a Worker Deployment, if no versioned workers have ever polled. In that case we need to continue the reconcile loop to create the worker pods which will poll and create the Worker Deployment.

TemporalState can also, rarely, be empty if the server returns a transient NotFound error, which can happen at any time in a Worker Deployment's life. If TemporalState is empty when there are Deprecated Versions around, it is important that we do not take an empty TemporalState to mean that those Deprecated Versions are NotRegistered and should be deleted, because that would cause the controller to delete those Deployments despite the fact that they are actually draining. This change prevents that.

Checklist

  1. Closes

  2. How was this tested:
    Unit test

  3. Any docs updates needed?

@carlydf carlydf requested review from a team and jlegrone as code owners September 24, 2025 23:14
Copy link
Member

@Shivs11 Shivs11 left a comment

Choose a reason for hiding this comment

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

yay

@carlydf carlydf changed the title Throw error and retry Reconcile if Deployment is NotFound Only Delete Deployments of NotRegistered versions if TemporalState is non-empty Sep 24, 2025
@carlydf carlydf merged commit 6d80452 into main Sep 25, 2025
11 checks passed
@carlydf carlydf deleted the handle-not-found branch September 25, 2025 00:20
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