Skip to content

Add app subscription migration commands - #8399

Open
tyler-eon wants to merge 2 commits into
mainfrom
eon/subscription-migrations
Open

Add app subscription migration commands#8399
tyler-eon wants to merge 2 commits into
mainfrom
eon/subscription-migrations

Conversation

@tyler-eon

@tyler-eon tyler-eon commented Aug 25, 2026

Copy link
Copy Markdown

Why

Partners migrating legacy manual-billing subscriptions to Shopify-managed app pricing need a safe, scriptable CLI workflow.

What changed

Adds four core Shopify CLI commands:

  • shopify app subscription-migrations schedule
  • shopify app subscription-migrations unschedule
  • shopify app subscription-migrations status
  • shopify app subscription-migrations cancel

The commands:

  • resolve the app Client ID from the active app configuration, with an optional --client-id override;
  • accept migration CSVs through --input, stdin, or --input -;
  • validate the complete CSV before making a network mutation;
  • normalize and sort shop GIDs, then create deterministic batches of at most 250 shops;
  • generate a portable root idempotency key and deterministic per-batch keys;
  • preserve every accepted operation GID when a later batch fails;
  • support repeated --id flags for multi-batch status and cancellation;
  • show visible polling progress for watched submissions and status checks;
  • keep JSON stdout machine-readable while polling progress is rendered on stderr.

cancel stops an operation from processing additional shops. It does not undo shops that have already been scheduled or migrated; unschedule is the separate reversal workflow.

Testing

  • pnpm vitest run packages/app/src/cli — 2,250 tests passed
  • focused subscription migration suite — 157 tests passed
  • pnpm --filter @shopify/app lint
  • pnpm --filter @shopify/app type-check
  • pnpm --filter @shopify/app build
  • CLI command discovery and help for all four commands
  • command-tree snapshot verification
  • malformed file/stdin CSV validation before authentication or network access
  • generated README, oclif manifest, and Shopify.dev command documentation verification

Assisted-By: devx/bb753bc6-d4c5-4a52-8d97-044f4b1a3497
@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Aug 25, 2026
@tyler-eon
tyler-eon marked this pull request as ready for review August 25, 2026 19:14
@tyler-eon
tyler-eon requested review from a team as code owners August 25, 2026 19:14
Assisted-By: devx/bb753bc6-d4c5-4a52-8d97-044f4b1a3497
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant