Skip to content

Drop CopyInstanceInput.Message (field removed from V2 schema)#24

Merged
coryodaniel merged 1 commit into
mainfrom
fix/copy-instance-drop-message-field
May 15, 2026
Merged

Drop CopyInstanceInput.Message (field removed from V2 schema)#24
coryodaniel merged 1 commit into
mainfrom
fix/copy-instance-drop-message-field

Conversation

@coryodaniel
Copy link
Copy Markdown
Member

Summary

copyInstance is broken in the current SDK build: every call fails at the GraphQL parser before reaching the resolver.

input:3: Argument "input" has invalid value $input.
In field "message": Unknown field.

The V2 schema dropped message from CopyInstanceInput — copy is a pure config-staging operation; messages live on the createDeployment that follows. The SDK was generated when message was on the input and still carries it, with no omitempty, so every call marshals \"message\": \"\" and gets rejected.

This regenerates the genqlient client against the current prod schema and drops Message from the public instances.CopyInput.

Changes

  • massdriver/internal/gen/schema.graphql — refreshed from https://api.massdriver.cloud/graphql/v2/schema.graphql. CopyInstanceInput loses message.
  • massdriver/internal/gen/zz_generated.go — regenerated (make generate). CopyInstanceInput struct + getters + (un)marshal helpers drop Message.
  • massdriver/platform/instances/instances.go — drop Message string from CopyInput; drop it from the gen-level mapping in Service.Copy.
  • massdriver/platform/instances/instances_test.go — fixture stops setting Message.

Test plan

  • go build ./...
  • go test ./... — all packages green
  • CI

Fixes #23. Unblocks massdriver-cloud/mass#236 and massdriver-cloud/mass#238.

The V2 `copyInstance` mutation's input dropped `message` (it was an
accidental addition that didn't belong on a pure copy operation —
plan deployments carry their own message via createDeployment). The
generated client still carried `Message string` with no omitempty
tag, so every call serialized `"message": ""` and the server
rejected the whole input with:

    Argument "input" has invalid value $input.
    In field "message": Unknown field.

Regenerate against the current prod schema (massdriver/internal/gen
catches up on the cleanup) and drop `Message` from the public
instances.CopyInput. Test fixture stops passing the removed field.

Fixes #23.
@coryodaniel coryodaniel merged commit 37eacaa into main May 15, 2026
4 checks passed
@coryodaniel coryodaniel deleted the fix/copy-instance-drop-message-field branch May 15, 2026 22:42
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.

CopyInstance broken: SDK sends removed message field, server rejects with "Unknown field"

2 participants