Repository navigation
Keep polling dev store creation when the status read comes back empty - #9024
Merged
Merged
Conversation
`store create dev` polls Business Platform's `storeCreation` right after the create mutation returns. Business Platform serves that query from a read replica, so when the replica lags behind the write, the store creation record isn't there yet and the status comes back empty. The CLI treated that as fatal and aborted with "Unable to determine store creation status." on the first poll, even though the store was being created. Treat a missing status as still pending and keep polling until the existing 5-minute timeout, the way the admin's store creation flow (used by the Dev Dashboard) already does. Terminal statuses still fail at once. If no status ever appears before the timeout, the error says so and points to `shopify store list` to check whether the store was created. Co-authored-by: Alex Montague <[email protected]>
amcaplan
approved these changes
Oct 28, 2026
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.
WHY are these changes introduced?
shopify store create devintermittently fails with "Unable to determine store creation status." right after the store is created.The CLI polls Business Platform's
organization.storeCreation(shopDomain:)immediately aftercreateAppDevelopmentStorereturns. BP routes Organizations GraphQL queries to a read replica by default, so when replication lags behind the write that created theStoreCreationrecord, the query returnsstoreCreation: null. The CLI treated an empty status as fatal and aborted on the very first poll, even though the store was being created (and usually finished a few seconds later).On 2026-10-26, BP replica lag rose to 3–5 s peaks during a schema migration, and about half of CLI dev store creations failed this way, on every CLI version. The Dev Dashboard / admin-web store creation flow reads the same replica but didn't fail, because it treats a missing status as pending and keeps polling.
WHAT is this pull request doing?
storeCreationstatus (or a missingorganization) as still pending, shows "Waiting for store creation to start", and keeps polling every 2 s until the existing 5-minute timeout. This matches admin-web's behaviour.COMPLETEstill returns, andFAILED/TIMED_OUT/USER_ERRORstill fail immediately, including when they show up after empty reads.shopify store listbefore trying again.@shopify/cli.A server-side fix (route
storeCreationto BP's writer, viaWRITER_REQUIRED_FIELDS) would also help every client. That's separate, and this CLI change is worth having either way.How to test your changes?
pnpm vitest run packages/organizations/src/cli/services/dev/create-dev-store.test.ts. The new tests cover empty reads followed byCOMPLETE, a terminal status after an empty read, and a timeout with no status ever reported. The three new tests fail onmain.shopify store create devagainst an org. While BP replica lag is elevated, the spinner shows "Waiting for store creation to start" for a moment and then carries on, instead of failing.Checklist
Requested by Alex Montague [email protected]