Skip to content

pscale role reassign --successor accepts an undocumented identifier format #1263

@ElArkk

Description

@ElArkk

For each role, the CLI exposes three identifiers (via role list):

Field Example
Short ID (id) BBBBBBBBBBBB
Full username (username) pscale_api_BBBBBBBBBBBB.suffix
Display name (name) main-2026-01-28-xxxxxx

Other role subcommands (get, source positional of reassign) accept the short ID. reassign --successor, however, accepts none of these three but only a fourth, undocumented format.

Given two roles with short ID A and B:

# Short ID (works for `role get`, source positional):
$ pscale role reassign … A --successor B
Error: successor role "B" does not exist

# Full username (as shown by `role list`):
$ pscale role reassign … A --successor pscale_api_B.suffix
Error: successor: invalid role name "pscale_api_B.suffix"

# Display name:
$ pscale role reassign … A --successor main-2026-01-28-xxxxxx
Error: successor: invalid role name "main-2026-01-28-xxxxxx"

# Prefixed-but-unsuffixed (works - undocumented):
$ pscale role reassign … A --successor pscale_api_B
Objects … successfully reassigned to pscale_api_B.

Expected

--successor should accept the short ID and/or full username, symmetric with the source positional.

Bonus bug

With certain rejected formats the CLI emits

Error: internal error, response body doesn't match error type signature

instead of a clear message.

Environment

  • pscale 0.286.0
  • PlanetScale Postgres database

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions