Skip to content

fix(e2e): reduce playwright workers for staging to avoid FAPI rate limiting#8132

Merged
jacekradko merged 1 commit intomainfrom
jacek/staging-reduce-workers
Mar 20, 2026
Merged

fix(e2e): reduce playwright workers for staging to avoid FAPI rate limiting#8132
jacekradko merged 1 commit intomainfrom
jacek/staging-reduce-workers

Conversation

@jacekradko
Copy link
Member

@jacekradko jacekradko commented Mar 20, 2026

Summary

  • Add E2E_WORKERS env var support to playwright config, falling back to existing behavior
  • Set E2E_WORKERS=2 in the staging E2E workflow to reduce concurrent FAPI requests
  • The generic suite runs 212 tests with 4 workers (50% of 8 vCPUs), each spawning long-running apps against the same staging instance — this causes "Too many requests" rate limiting on the staging FAPI
  • Reducing to 2 workers halves the concurrent requests while keeping reasonable throughput

Test plan

  • Verified E2E_WORKERS is respected by playwright config
  • Non-staging workflows unaffected (env var not set, falls back to 50%/70%)

Summary by CodeRabbit

  • Chores
    • Optimized test infrastructure configuration by introducing configurable worker allocation for end-to-end tests, enabling more flexible resource management during automated testing.

…miting

The generic suite runs 212 tests with 4 workers, each spinning up
long-running apps against the same staging instance. This overwhelms
the staging FAPI rate limits causing 'Too many requests' errors.

Add E2E_WORKERS env var support to playwright config and set it to 2
for the staging workflow.
@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2026

⚠️ No Changeset found

Latest commit: 2a6e4ca

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Mar 20, 2026 2:13am

Request Review

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 20, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@8132

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8132

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8132

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8132

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8132

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8132

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8132

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8132

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8132

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8132

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8132

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8132

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8132

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8132

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8132

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8132

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8132

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8132

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8132

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8132

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8132

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8132

commit: 2a6e4ca

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2d73e4c0-e553-4cb6-ba21-1a15f35b5db5

📥 Commits

Reviewing files that changed from the base of the PR and between 524b32f and 2a6e4ca.

📒 Files selected for processing (2)
  • .github/workflows/e2e-staging.yml
  • integration/playwright.config.ts

📝 Walkthrough

Walkthrough

The pull request introduces configuration for controlling the number of parallel workers in end-to-end tests. An environment variable E2E_WORKERS is added to the staging workflow with a value of '2'. The Playwright configuration is updated to read this environment variable as the primary source for the workers setting, with fallback logic to use '50%' in CI environments or '70%' otherwise. This allows explicit control over test parallelization from the workflow level.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: reducing Playwright workers for staging to address FAPI rate limiting, which is the core objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@jacekradko jacekradko merged commit 21ec3d6 into main Mar 20, 2026
41 of 44 checks passed
@jacekradko jacekradko deleted the jacek/staging-reduce-workers branch March 20, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants