Skip to content

fix(databases): show branch names the API accepts and say when a connection string is withheld - #169

Open
subnetmarco wants to merge 1 commit into
mainfrom
fix/database-branch-cli-output
Open

fix(databases): show branch names the API accepts and say when a connection string is withheld#169
subnetmarco wants to merge 1 commit into
mainfrom
fix/database-branch-cli-output

Conversation

@subnetmarco

Copy link
Copy Markdown
Member

Summary

  • Branch names are lowercase letters, digits and underscores. Every documented example and test fixture used feature-x, a name the API refuses, so anyone copying the docs got a 400 on their first branch.
  • --show-connection-string printed nothing when the platform withholds the string until the resource is active. The database and branch views now say why the line is empty, and a rotation that returns no string warns and points at the command that reads it — that string is the user's only copy of the new credential.
  • A branch with no expires_at rendered as expired in both views, which reads as a branch about to be collected rather than a malformed response.
  • Documents the branch name rules and the plans branching is on (every plan; 10 branches per database on Free, 25 on Pro).

Test plan

  • make check
  • go test ./internal/cmd/databases/... ./internal/output/...
  • Cloud: volcano cloud databases branches get <db> <branch> --show-connection-string on a provisioning branch reports the withheld string

Made with Cursor

…ng is withheld

Branch names are lowercase letters, digits and underscores, so every documented
example and test fixture named feature-x was a name the API refuses. Anyone
copying the docs got a 400 on their first branch.

A connection string the platform withholds until a resource is active made
--show-connection-string print nothing at all, indistinguishable from a flag
that did nothing. Both the database and branch views now say why the line is
empty, and a password rotation that comes back without one warns and points at
the command that reads it, since that string is the user's only copy of the new
credential.

A branch whose expires_at is absent rendered as expired in both views, which
reads as a branch about to be collected rather than a malformed response.

Co-authored-by: Cursor <cursoragent@cursor.com>
@subnetmarco
subnetmarco requested a review from a team as a code owner August 23, 2026 21:29
Copilot AI balanced review requested due to automatic review settings August 23, 2026 21:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants