Skip to content

Add --with-password to branch get and branch create - #281

Merged
nathanjcochran merged 4 commits into
mainfrom
nathan/branch-passwords
Oct 29, 2026
Merged

nathanjcochran merged 4 commits into
mainfrom
nathan/branch-passwords

Conversation

@nathanjcochran

@nathanjcochran nathanjcochran commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Adds --with-password to tiger branch get and tiger branch create, which are behind TIGER_EXPERIMENTAL. It matches the flag on service get and service create.

  • The password goes in the output (a Password row, password in JSON/YAML, PGPASSWORD with -o env) and in the connection string. It's the branch's own password, never its parent's.
  • branch get --with-password fails if no password is stored, like service get.
  • branch create --with-password falls back to the password from the create response, so it works even with --password-storage none.
  • After a branch password update, the CLI now suggests tiger branch get <branch> --with-password to view it, as it does for services.

It also makes the branch and service flows behave the same in a few places:

  • Waiting on a branch updates only its status, as waiting on a service does. It used to replace the whole branch, which dropped the create response's password. Add experimental branch MCP tools #271 makes the same change, so the two can merge in either order.
  • A branch without an endpoint gets the same warning a service does, instead of silently leaving out its connection details. The endpoint error now says endpoint not available rather than service endpoint not available, since it can be about a branch, and so do the pgpass storage errors.
  • branch create refuses a --wait-timeout that isn't positive, as service create does.

The MCP side (with_password on branch_get and branch_create) is in #271.

Like the service commands, branch get and branch create can include the
branch's tsdbadmin password in their output and connection string. branch
get fails when no password is stored, as service get does. branch create
falls back to the password from the create response, which it keeps aside
since waiting replaces the branch with one that carries none.

A branch password update now points at branch get --with-password.
WaitForBranch replaced the whole branch on every poll, unlike
WaitForService, which updates only the status. That dropped the create
response's password, which the polls never return. Waiting now updates the
status alone, as it does for services, so branch create reads the password
straight off the branch.
prepareBranchForOutput skipped the connection details silently when a
branch had no endpoint, where prepareServiceForOutput warns. Both now warn.

The endpoint errors from GetConnectionDetails and pgpass storage said
"service endpoint not available", though either can now be about a
branch, so they say "endpoint not available".
@nathanjcochran
nathanjcochran force-pushed the nathan/branch-passwords branch from 94d5d51 to 95c416f Compare October 28, 2026 20:26
@nathanjcochran
nathanjcochran marked this pull request as ready for review October 28, 2026 20:35
@nathanjcochran
nathanjcochran requested a review from a team as a code owner October 28, 2026 20:35
branch create accepted a --wait-timeout of zero or less, which made the
wait time out immediately. It now refuses one, as service create does.
@nathanjcochran
nathanjcochran force-pushed the nathan/branch-passwords branch from 95c416f to 0af24fc Compare October 28, 2026 21:56
@nathanjcochran nathanjcochran changed the title Add --with-password to branch get and branch create Add --with-password to branch get and branch create Oct 28, 2026
@nathanjcochran
nathanjcochran merged commit 7c44f9f into main Oct 29, 2026
4 checks passed
@nathanjcochran
nathanjcochran deleted the nathan/branch-passwords branch October 29, 2026 20:34
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