Repository navigation
Fix encryption validation CLI issues from the EVE bug bash - #126
Merged
Merged
Conversation
- Remove `encryption-validation enable`; `set --mode warn|deny` is the single way to configure validation, so users don't mix enable and set. - `get` shows the server defaults (metadata key `encoding`, values `[binary/encrypted]`) when the key or values are unset. - `set` and `disable` error when nothing would change unless --idempotent is set, matching their help text and other commands. - Reject blank --metadata-value before prompting instead of failing at the API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jeri-temporal
approved these changes
Nov 9, 2026
This branch was successfully deployed
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.
Follow-up to #113. Fixes CLI issues found during the Encryption Validation at the Edge (EVE) bug bash.
Changes
encryption-validation enable.set --mode warn|denyis now the single way to turn validation on and configure it. This also removes a confusing case wheredisablefollowed byenablebrought a deny-mode namespace back in warn mode.getshows effective defaults. When the metadata key or values are unset,getshows the server defaults (encoding/[binary/encrypted]) in both text and JSON output. Previously the key line was missing, e.g. for a namespace configured with only metadata values.set/disablenow error unless--idempotent. They used to print "Resource already in desired state" and exit 0, which contradicted the--idempotenthelp text. With--idempotentthey printstatus: unchanged, like other commands.--metadata-valuerejected client-side. Previously the CLI showed the diff and the apply prompt, and only then did the server reject the value.Help text in
commands.ymlis updated to match;commands.gen.gowas regenerated withmake gen.Testing
go test ./temporalcloudcli/ -run EncryptionValidationpasses (32 cases). New cases cover default display, no-op with and without--idempotent, and blank values.getshows the defaulted key, a no-opsetexits 1, the same with--idempotentprintsunchanged, a blank value exits 1 before any prompt, andenableno longer exists.mainlocally (Go 1.27.3):make mocks(mockery:package "cmp" without types) andTestErrorsAreNotLogMessages/TestErrorsAreNotLogMessagesJSON.🤖 Generated with Claude Code
Note
Medium Risk
Changes user-visible CLI behavior (removed subcommand, stricter no-op and flag validation) for experimental namespace encryption settings, but logic is localized and well-tested.
Overview
Removes
encryption-validation enableso turning validation on is done only viaset --mode warnorset --mode deny, with updated help incommands.yml/ generated Cobra output.getnow fills in server defaults (encoding/[binary/encrypted]) when metadata key or values are empty, so output reflects what is actually enforced.setanddisableno longer succeed silently when nothing would change: they error with a clear message unless--idempotentis set, in which case they emitstatus: unchangedlike other cloud commands.setalso rejects blank--metadata-valueentries before prompting or calling the API.Tests cover default display, idempotent no-ops, and blank metadata values; the enable command tests are removed.
Reviewed by Cursor Bugbot for commit 989e3a4. Bugbot is set up for automated code reviews on this repo. Configure here.