fix(planetscale): make resize-request restart optional#385
Merged
sam-goodwin merged 1 commit intoJul 22, 2026
Merged
Conversation
PlanetScale removed the restart field from the branch change-request payload (it is gone from the current published spec), so the required Schema.Array decode now fails every get/list/update change-request call with SchemaError: Missing key ["restart"]. Drop restart from the required lists in resize-request.patch.json and make the field optional in the three generated operations. The generated files are hand-adjusted to the minimal semantic change because a full regenerate currently drags in unrelated drift. Fixes alchemy-run#384
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.
Fixes #384.
PlanetScale removed the
restartfield ("ports requiring a restart") from the branch change-request payload — it is gone from the current published spec (distilled-spec-planetscalemainno longer has it onPostgresClusterResizeRequest), and the live API stopped returning it. The generated client still requires it, so everygetBranchChangeRequest/listBranchChangeRequests/updateBranchChangeRequestcall fails at decode withSchemaError: Missing key ["restart"]— the server-side change succeeds, leaving callers (e.g. alchemy'sPlanetscale.PostgresBranchreplica reconciliation) half-applied.Changes:
patches/resize-request.patch.json: droprestartfrom bothrequiredlists (the patch previously re-asserted it while makingcompleted_atnullable). Optional rather than removed, so the client tolerates both old and new API behavior.restart→ optional (restart?: ReadonlyArray<number>/Schema.optional(Schema.Array(Schema.Number))), matching the existing optional-field idiom.Note: the generated files are hand-adjusted to the minimal semantic change rather than fully regenerated — running
bun run generatetoday produces ~150 files of unrelated drift (formatting +SensitiveOutputNullableString→SensitiveOutputStringchanges), which I did not want to fold into this fix.bun run check(tsc + oxlint + oxfmt) passes; the test suite requires live PlanetScale credentials I did not run against.Verified against the live API: a
PATCH .../branches/{branch}/changesresponse today carries norestartkey, and the patched schema decodes it.