Skip to content

Commit da2dabe

Browse files
authored
add section on concurrency limits to dashboard/test/ui/README.md (#73154)
1 parent e04e222 commit da2dabe

3 files changed

Lines changed: 28 additions & 11 deletions

File tree

dashboard/test/ui/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,33 @@ The UI tests run as part of our deployment during the Deploy To Test (DTT) via `
2828

2929
Each suite uploads its own status page (`test_status_{Safari_iPad_iPhone_UI,Chrome_Firefox_UI,Eyes}.html`) to the test machine and to S3.
3030

31+
## Concurrency limits
32+
33+
SauceLabs and Device Farm each have their own cost structure and concurrency
34+
limits. SauceLabs charges by maximum concurrency. Device Farm charges per test
35+
run, but also has separate concurrency limits for desktop and mobile within each
36+
AWS account. Device Farm limits can be increased at no additional cost by
37+
negotiating with AWS support based on current need an availability.
38+
39+
Today, the relevant concurrency limits are:
40+
41+
| Provider | AWS Account | Concurrency | Usage |
42+
|---------------------|-------------|-------------|-------------------------|
43+
| SauceLabs || 65 | DTT + local development |
44+
| Device Farm Desktop | codeorg | 150 | DTT + local development |
45+
| Device Farm Desktop | codeorg-dev | 150 | Drone (CI) |
46+
47+
Staying under concurrency limits in DTT is straightforward, because only one DTT
48+
runs at a time. Staying under limits in Drone is less predictable, because there
49+
is no limit to the number of concurrent Drone runs, and each concurrent drone
50+
run might not be running the maximum number of UI tests at a given time.
51+
Therefore, the simplest plan is to request additional increases to Device Farm
52+
Desktop (codeorg-dev) concurrency if/when we start seeing UI tests fail in Drone
53+
with concurrency errors like this one:
54+
```
55+
Cannot exceed 150 concurrent sessions. Currently active=130, pending=20, failed=0 (Selenium::WebDriver::Error::SessionNotCreatedError)
56+
```
57+
3158
## Local Setup
3259

3360
### On your machine: Chrome webdriver

lib/rake/ci.rake

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,6 @@ namespace :ci do
171171
container_features = `find ./features -name '*.feature' | sort`.split("\n").map {|f| f[2..]}
172172
eyes_features = `grep -lr '@eyes' features`.split("\n")
173173
container_eyes_features = container_features & eyes_features
174-
# The concurrency limit for Device Farm desktop sessions in the
175-
# codeorg-dev AWS account is 50. This concurrency limit is shared across
176-
# all CI jobs. This limit is not shared by sessions running in local
177-
# development or the chef-managed test environment, which run in the prod
178-
# AWS account. This limit must be taken into consideration when choosing
179-
# parallelism as well as when choosing to run on Device Farm vs SauceLabs
180-
# or local chromedriver.
181-
#
182174
# Use --local to configure the UI tests to run against localhost, and
183175
# --config to override the local webdriver with the remote provider
184176
# (Device Farm Chrome by default, SauceLabs under [use saucelabs] or any

lib/rake/test.rake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace :test do
4343
'-d', CDO.site_host('studio.code.org'),
4444
'-p', CDO.site_host('code.org'),
4545
'--db', # Ensure features that require database access are run even if the server name isn't "test"
46-
'--parallel', '65', # The total saucelabs concurrency budget is 65
46+
'--parallel', '65',
4747
'--magic_retry',
4848
'--with-status-page',
4949
'--fail_fast',
@@ -62,8 +62,6 @@ namespace :test do
6262
end
6363

6464
timed_task_with_logging :devicefarm_desktop_ui do
65-
# As of June 2026, our concurrency limit for desktop browser sessions in
66-
# Device Farm within our prod AWS account is 150.
6765
ChatClient.log 'Running <b>dashboard</b> Chrome + Firefox UI tests...'
6866
failed_browser_count = RakeUtils.system_with_chat_logging(
6967
"cd #{dashboard_dir('test/ui')} &&",

0 commit comments

Comments
 (0)