Skip to content

Reuse E2E auth state during app cleanup#7961

Merged
alfonso-noriega merged 1 commit into
mainfrom
06-30-e2e_cleanup_reuse_auth
Jun 30, 2026
Merged

Reuse E2E auth state during app cleanup#7961
alfonso-noriega merged 1 commit into
mainfrom
06-30-e2e_cleanup_reuse_auth

Conversation

@alfonso-noriega

@alfonso-noriega alfonso-noriega commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Current-run E2E app cleanup re-authenticates through Shopify Accounts after Playwright global setup already created browser storage state. In CI this contributes to Accounts 429s before cleanup can list/delete apps.

WHAT is this pull request doing?

  • Reuses E2E_BROWSER_STATE_PATH or the default .e2e-tmp/global-auth/browser-storage-state.json when present.
  • Adds scripts/prime-browser-auth.ts so standalone cleanup jobs can create the same storage state before cleanup.
  • Falls back to the existing direct login path when no storage state is available.
  • Retries with direct login if the stored state is rejected and navigation lands on Accounts.

How to test your changes?

  • cd packages/e2e && pnpm tsc --noEmit
  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/tests-pr.yml"); puts "YAML OK"'\n\nNote: pnpm nx run e2e:type-check currently fails on @shopify/organizations type resolution in app/store build dependencies in this worktree, before reaching this cleanup script.

@alfonso-noriega alfonso-noriega requested a review from a team as a code owner June 30, 2026 09:43
@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Jun 30, 2026
Assisted-By: devx/56dcddb4-0bb1-4e96-b794-1bb2fda2cba1
@alfonso-noriega alfonso-noriega force-pushed the 06-30-e2e_cleanup_reuse_auth branch from 4b3369e to cb7a258 Compare June 30, 2026 09:44
@alfonso-noriega alfonso-noriega added this pull request to the merge queue Jun 30, 2026
Merged via the queue into main with commit a73cc31 Jun 30, 2026
28 checks passed
@alfonso-noriega alfonso-noriega deleted the 06-30-e2e_cleanup_reuse_auth branch June 30, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants