Repository navigation
test(e2e): stop machine auth tests from hitting BAPI rate limits - #10642
Conversation
Run each machine auth describe block in default mode so beforeAll runs once per block instead of once per worker, and wrap the machine and OAuth Clerk clients in withRetry so 429s back off instead of failing.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: a765c9d The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-native-components
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
…rt before merge)" This reverts commit 61e28dd.
wobsoriano
left a comment
There was a problem hiding this comment.
Approving since all tests are passing 🧪



Description
The
machineintegration job keeps failing on429 Too Many Requestsfrom the Backend API. All 21 failed job logs I pulled (from 30 failedmachinejobs in the last 150 CI runs) show it. Most of the 429s come fromcreateFakeMachineNetworkinbeforeAll, and the rest from creating and deleting OAuth apps.Two things cause it:
beforeAllruns once per worker. The machine auth describe blocks usemode: 'parallel'. In that mode Playwright runsbeforeAllin every worker that picks up a test from the block, so each block boots several apps and creates several sets of machines and tokens against the sharedwith-api-keysinstance. Each CI retry runs it again. A local test with Playwright 1.62.1 and 4 workers ranbeforeAll4 times inparallelmode and once indefaultmode.createTestUtilsalready wraps its client inwithRetry(integration/testUtils/index.ts), butcreateMachineClientandcreateOAuthClientcreated plain clients, so one 429 failed the whole block.This PR:
machineAuthHelpers.tsandnext-machine.test.tstomode: 'default'. Each block now sets up once, and blocks still run in parallel across workers.createMachineClientandcreateOAuthClientin the existingwithRetry.Not yet verified: the machine suite hasn't been run against the real instances. This PR's CI run will be the first check.
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change