Parallelize E2E store cleanup and add --force mode - #8311
Draft
isaacroldan wants to merge 3 commits into
Draft
Conversation
Mirrors the worker-pool pattern from cleanup-apps (#8292): 5 workers, each with its own page, pulling stores from a shared queue. Adds a --force mode that deletes stores without checking installed apps, which skips the browser entirely for the per-store work. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Instead of spawning a CLI process per store (which boots oclif, re-authenticates, and polls up to 5 minutes for deletion confirmation), force mode now fires the DeleteAppDevelopmentStore mutation directly with a single shared token and runs 20 workers instead of 5. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The shared ListAppDevStores query fetches a single page of the server's default size, so discovery silently capped at one page and only warned. Use a script-local paginated query (first: 100, cursor loop, 50-page safety cap) so a single run finds every matching store. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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?
Follow-up to #8292, which parallelized the E2E app cleanup script. The store cleanup script still processed stores serially, one admin page visit at a time, and its API discovery silently capped at one page of results.
WHAT is this pull request doing?
cleanup-stores.ts: 5 workers, each with its own page from the shared browser context, pulling stores from a shared queue. Outcomes (succeeded/skipped/failed) are aggregated after the pool drains.[worker N] [i/total] store-namesince output now interleaves, including the per-app uninstall logs.--forcemode that requests deletion for every matching store directly through the Business PlatformdeleteAppDevelopmentStoremutation — no per-store admin visit, no app check, no CLI subprocess, and none of the CLI's 5-minute deletion-confirmation polling. Deletions are requested and left to complete asynchronously. Since force mode is pure API calls, it runs 20 workers instead of 5.ListAppDevStoresquery fetches a single page of the server's default size and the script previously just warned when more pages existed. Discovery now uses a script-local paginated query (first: 100, cursor loop, 50-page safety cap) so a single run finds every matching store.--listmode stays serial, matching the scope of Parallelize E2E app cleanup with worker pool #8292.The
fullanddeletemodes keep using the CLI for deletion (per #8290). Force mode is a janitorial fast path: note that force-deleting a store that still has apps installed leaves those apps undeletable in the Dev Dashboard until their install records clear.Concurrent CLI store deletions are already exercised by the E2E suite itself, where parallel Playwright workers create and delete stores through the CLI.
How to test your changes?
Measuring impact
🤖 Generated with Claude Code