Use the EmitDefaultValues field for the namespace capacity get command - #103
Open
khisakuni wants to merge 3 commits into
Open
Use the EmitDefaultValues field for the namespace capacity get command#103khisakuni wants to merge 3 commits into
khisakuni wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 2a9b293. Configure here.
khisakuni
marked this pull request as ready for review
August 12, 2026 00:34
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 was changed
Adds and wires up a
EmitDefaultValuesoption when printing resources. Only thenamespace capacity getcommand currently uses it.Depends on temporalio/api-go#306
Why?
The
namespace capacity getcommand has some fields that are useful to print when the response from the API has zero values. For examplebefore:
after:
The
HasLegacyLimitsis displayed and theStatsfield is meaningful now.Checklist
Closes
How was this tested:
Note
Low Risk
Opt-in printer behavior change with default off, so existing command output is unchanged; only capacity get opts in. Shared printer plumbing is touched but behavior remains backward compatible.
Overview
Makes zero-valued fields visible in
namespace capacity getoutput (e.g.HasLegacyLimits: false, zeroed stats), so capacity info is more useful when the API returns defaults.Adds an opt-in
EmitDefaultValuesflag to the shared printer (PrintResourceOptions/StructuredOptions). When set, scalar defaults are printed in both text and JSON; unset pointer/message fields stay omitted. Only the capacity get command enables it today.Also bumps
go.temporal.io/apiforCustomJSONMarshalOptions.EmitDefaultValuessupport, and extends test helpers accordingly.Reviewed by Cursor Bugbot for commit 3251c8e. Bugbot is set up for automated code reviews on this repo. Configure here.