fix(controller): DescribeVersion on NotRegistered Versions to prevent pre-mature scaledown of said versions - #556
Merged
Conversation
Shivs11
commented
Aug 28, 2026
Shivs11
marked this pull request as ready for review
August 28, 2026 16:16
jaypipes
reviewed
Aug 28, 2026
Member
Author
|
going to hold off on this one for now, and wait for @carlydf's PR to go through! |
carlydf
reviewed
Aug 28, 2026
Shivs11
force-pushed
the
shivam/issue-550-notregistered-notfound
branch
from
August 29, 2026 20:03
7e1906d to
7b52420
Compare
Shivs11
commented
Aug 29, 2026
carlydf
approved these changes
Aug 30, 2026
jaypipes
reviewed
Aug 31, 2026
| for buildID := range k8sDeployments { | ||
| if _, exists := state.Versions[buildID]; exists { | ||
| continue | ||
| } |
Collaborator
There was a problem hiding this comment.
would be great to put a log line in here:
l.Info(
"warning: Kubernetes Deployment not found in WorkerDeployment VersionSummaries. "+
"Possible inconsistent Temporal server state.",
"buildID", buildID,
)| }, | ||
| ) | ||
| if versionInfo == nil || versionInfo.Status == temporaliov1alpha1.VersionStatusNotRegistered { | ||
| return nil, fmt.Errorf("describe worker deployment version for buildID %q returned no registered status", buildID) |
Collaborator
There was a problem hiding this comment.
Suggested change
| return nil, fmt.Errorf("describe worker deployment version for buildID %q returned no registered status", buildID) | |
| return nil, fmt.Errorf("describe worker deployment version for buildID %q returned NotRegistered status", buildID) |
|
|
||
| var deployment appsv1.Deployment | ||
| if err := k8sClient.Get(ctx, types.NamespacedName{Name: deploymentNameV1, Namespace: namespace}, &deployment); err != nil { | ||
| return fmt.Errorf("v1 Deployment was deleted: %w", err) |
Collaborator
There was a problem hiding this comment.
Technically, this should check whether err was NotFound...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
NotRegisteredBehavioral impact
VersionSummariesretain their existing status precedence and rollout behavior.VersionSummariesnow triggers oneDescribeVersioncall:NotFoundpreserves the existingNotRegisteredcleanup pathTesting
go test ./internal/temporal ./internal/controller ./internal/planner -count=1go test -v -tags test_dep ./internal -run 'TestIntegration/missing-summary-version-is-described-before-deletion' -count=1go vet ./internal/temporal ./internal/controller ./internal/plannergit diff --checkCloses #550