馃挜 Show all important fields and omit unset times in worker deployment describe-version - #1223
Draft
moody-temporal wants to merge 2 commits into
Draft
moody-temporal wants to merge 2 commits into
moody-temporal wants to merge 2 commits into
Conversation
A version that was never ramped (or never current) has no RampingSinceTime/CurrentSinceTime. These nil timestamps were converted via AsTime() to the Unix epoch, which the text output rendered as "a long while ago" and JSON output as "1970-01-01T00:00:00Z". Treat nil/epoch timestamps as unset: omit them from text output and from JSON output. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add the version's Status, FirstActivationTime, LastCurrentTime, LastDeactivationTime and LastModifierIdentity to both text and JSON output. Unset times are omitted, and drainageInfo is omitted from JSON when the server does not report it instead of printing zero times. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
What changed?
Two fixes to
temporal worker deployment describe-version, one per commit:RampingSinceTime(orCurrentSinceTime). The empty timestamp went throughAsTime(), which returns the Unix epoch. The text output then showedRampingSinceTime a long while agoand the JSON showed"rampingSinceTime": "1970-01-01T00:00:00Z". An empty or epoch timestamp is now treated as unset and left out of both text and JSON. This coversroutingChangedTime,currentSinceTimeandrampingSinceTime.Status,FirstActivationTime,LastCurrentTime,LastDeactivationTimeandLastModifierIdentityto text and JSON output. Unset times are left out.drainageInfois left out of JSON when the server doesn't report it, instead of printing an empty status and0001-01-01times.馃挜 JSON output changes:
routingChangedTime,currentSinceTime,rampingSinceTimeanddrainageInfo(and itslastChangedTimeandlastCheckedTime) are now left out when unset, instead of holding epoch or zero-value times.status,firstActivationTime,lastCurrentTime,lastDeactivationTime,lastModifierIdentity.Checklist
Stability
-o json/-o jsonl) are treated as breaking changesDesign
Behavior
Tests
SharedServerSuite):TestDeployment_Describe_Version_Omits_Unset_Timesfunc TestXxx) where applicable:TestPrintWorkerDeploymentVersionInfoProto_AllFields,TestVersionStatusProtoToStrNote: the current dev server doesn't send
firstActivationTime,lastCurrentTime,lastDeactivationTimeorlastModifierIdentityinDescribeWorkerDeploymentVersion(confirmed with a raw gRPC call). The unit test covers them by passing a fully populated proto through the printer.Manual tests
Setup
Happy path
A version that has only been current no longer shows
RampingSinceTime a long while ago, and now shows itsStatus:After promoting v2, v1 is draining:
Error case
Composition