Only Delete Deployments of NotRegistered versions if TemporalState is non-empty #147
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Closes
How was this tested:
Unit test
Any docs updates needed?