Repository navigation
Add --client-tablet-targeting-policy to pscale password create and update - #1538
Draft
maxenglander wants to merge 4 commits into
Draft
maxenglander wants to merge 4 commits into
maxenglander wants to merge 4 commits into
Conversation
Pass client_tablet_targeting_policy through to the password create and update requests, and show it in password show and list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
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 5a3e995. Configure here.
| ConnectionType string `header:"connection type" json:"connection_type"` | ||
| ClientTabletTargetingPolicy string `header:"client tablet targeting" json:"client_tablet_targeting_policy"` | ||
| CreatedAt int64 `json:"created_at"` | ||
| orig *ps.DatabaseBranchPassword |
Contributor
There was a problem hiding this comment.
Create output omits targeting policy
Low Severity
PasswordWithPlainText and toPasswordWithPlainText never copy ClientTabletTargetingPolicy, so pscale password create human and CSV tables omit the policy just set with --client-tablet-targeting-policy. JSON still includes it via orig, and show/list display it because Password and passwordWithoutTTL were updated.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 5a3e995. Configure here.
Passwords can switch between apply and ignore later, so drop the client_tablet_targeting_policy_locked field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The API can return null for the policy. It decodes to an empty string, so show and list print an empty value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cover the field being missing as well as null. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been 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.


Adds
--client-tablet-targeting-policytopscale password createandpscale password update, and shows the policy inpscale password showandlist.Global replica passwords can ignore a tablet type the client sets (
USE @replica,mydb@replica) and use their own. The API exposes this asclient_tablet_targeting_policy(applyorignore).create:applyorignore.update:applyorignore.The CLI passes the value through, and the API validates it. When the response has no policy,
showandlistprint an empty value.Depends on the API accepting
client_tablet_targeting_policyon password create and update.🤖 Generated with Claude Code