Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
- Increase setup timeout from 90s to 240s for CI variability - Start clerkJs and clerkUi HTTP servers in parallel via Promise.all - Cap http-server polling maxAttempts at 60 (was Infinity) - Add timing logs for HTTP server startup and app initialization
📝 WalkthroughWalkthroughThe changes modify the server initialization and test setup flow. The HTTP server retry mechanism is constrained to a maximum of 60 attempts instead of unlimited retries. The global setup timeout is increased from 90,000 ms to 240,000 ms. HTTP servers are now started in parallel using Promise.all instead of sequentially. Timing measurements and logs are added to track the duration of server startup and app initialization phases. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@integration/tests/global.setup.ts`:
- Around line 8-23: The PR changes global setup timeout and starts HTTP servers
and app inits in parallel (see setup.setTimeout, startClerkJsHttpServer,
startClerkUiHttpServer, parseEnvOptions, appConfigs.longRunningApps.getByPattern
and app.init) but no tests were added; add/adjust tests to cover the new
behavior by creating integration tests that assert the increased timeout is
applied, both HTTP servers start successfully when run in parallel (mock or test
endpoints for startClerkJsHttpServer and startClerkUiHttpServer), and that apps
returned by appConfigs.longRunningApps.getByPattern are initialized via app.init
with the new parallel flow and saved state behavior; ensure tests fail if
servers or app.init do not complete within the configured timeout and add them
to the appropriate test suite so CI enforces the coverage.
| setup.setTimeout(240_000); | ||
|
|
||
| await fs.ensureDir(constants.TMP_DIR); | ||
|
|
||
| await startClerkJsHttpServer(); | ||
| await startClerkUiHttpServer(); | ||
| const httpServerStart = Date.now(); | ||
| await Promise.all([startClerkJsHttpServer(), startClerkUiHttpServer()]); | ||
| console.log(`HTTP servers started in ${Date.now() - httpServerStart}ms`); | ||
|
|
||
| const { appIds } = parseEnvOptions(); | ||
| if (appIds.length) { | ||
| const apps = appConfigs.longRunningApps.getByPattern(appIds); | ||
| // state cannot be shared using playwright, | ||
| // so we save the state in a file using a strategy similar to `storageState` | ||
| const appStart = Date.now(); | ||
| await Promise.all(apps.map(app => app.init())); | ||
| console.log(`Apps initialized in ${Date.now() - appStart}ms`); |
There was a problem hiding this comment.
Add/adjust tests for the new setup behavior.
Lines 8-23 change the global setup timeout and parallel startup flow, but no tests were added or updated in this PR. Please add coverage for these changes before merge. As per coding guidelines, “If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes.”
🤖 Prompt for AI Agents
In `@integration/tests/global.setup.ts` around lines 8 - 23, The PR changes global
setup timeout and starts HTTP servers and app inits in parallel (see
setup.setTimeout, startClerkJsHttpServer, startClerkUiHttpServer,
parseEnvOptions, appConfigs.longRunningApps.getByPattern and app.init) but no
tests were added; add/adjust tests to cover the new behavior by creating
integration tests that assert the increased timeout is applied, both HTTP
servers start successfully when run in parallel (mock or test endpoints for
startClerkJsHttpServer and startClerkUiHttpServer), and that apps returned by
appConfigs.longRunningApps.getByPattern are initialized via app.init with the
new parallel flow and saved state behavior; ensure tests fail if servers or
app.init do not complete within the configured timeout and add them to the
appropriate test suite so CI enforces the coverage.
Summary
global.setup.ts(90s timeout exceeded while waiting for long-running apps to start)mainTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit