-
Notifications
You must be signed in to change notification settings - Fork 737
CONSOLE-5196: Fix Playwright CI timeout with globalTimeout and parallel workers #16780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
9c0fd77
333007a
317a3b4
92ba07a
0b3b398
4f19a01
423de45
5fe34c6
7dfc868
12db0fd
55d4910
875e522
1ab83e5
dbc006c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -49,6 +49,7 @@ export default defineConfig({ | |||||
| testDir: './e2e/tests', | ||||||
| testMatch: '**/*.spec.ts', | ||||||
| forbidOnly: isCI, | ||||||
| globalTimeout: parseInt(process.env.GLOBAL_TIMEOUT_MS || '0', 10) || (isCI ? 110 * 60 * 1000 : 0), | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the ternary/or combination is somewhat complex, maybe |
||||||
| retries: isCI ? 1 : 0, | ||||||
| timeout: 120_000, | ||||||
| reporter: isCI | ||||||
|
|
@@ -84,7 +85,7 @@ export default defineConfig({ | |||||
| }, | ||||||
| }, | ||||||
|
|
||||||
| workers: process.env.WORKERS ? parseInt(process.env.WORKERS, 10) : isCI ? 1 : undefined, | ||||||
| workers: process.env.WORKERS ? parseInt(process.env.WORKERS, 10) : undefined, | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
rg -n 'WORKERS|workers' frontend test-prow-playwright-e2e.sh
rg -n '"`@playwright/test`"|`@playwright/test`@' package.json yarn.lock frontend/package.json frontend/yarn.lock 2>/dev/null || trueRepository: openshift/console Length of output: 694 Preserve 🤖 Prompt for AI AgentsSource: Path instructions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: since we are not supporting percentage values we can be stricter and use
Suggested change
|
||||||
|
|
||||||
| projects: [ | ||||||
| { | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: openshift/console
Length of output: 5460
🏁 Script executed:
Repository: openshift/console
Length of output: 5460
🏁 Script executed:
Repository: openshift/console
Length of output: 844
🌐 Web query:
Playwright globalTimeout 0 meaning disable timeout documentation💡 Result:
In Playwright, setting globalTimeout to 0 means that the timeout behavior is disabled, allowing the test suite to run for an unlimited amount of time [1][2]. The globalTimeout configuration option defines the maximum time in milliseconds that the entire test suite is allowed to run [1]. By default, there is no global timeout (i.e., it is unlimited) [3][4]. When you explicitly set globalTimeout to 0, you are effectively choosing to disable any automatic termination of the test run based on duration, which can be useful if you do not want Playwright to stop the process prematurely [1][2]. This is distinct from other timeout settings in Playwright, where specific values are used to enforce constraints on individual tests, actions, or hooks to prevent resource wastage [3][4].
Citations:
Honor an explicit zero timeout override.
GLOBAL_TIMEOUT_MS=0is treated as unset in CI because of||, so the 110-minute default still applies. Check for an explicit env value before falling back.🤖 Prompt for AI Agents
Source: Path instructions