Skip to content

ci: speed up CI by installing fewer playwright deps#9207

Merged
janl merged 1 commit intoapache:masterfrom
neighbourhoodie:ci-slimmer-playwright
Mar 27, 2026
Merged

ci: speed up CI by installing fewer playwright deps#9207
janl merged 1 commit intoapache:masterfrom
neighbourhoodie:ci-slimmer-playwright

Conversation

@espy
Copy link
Copy Markdown
Contributor

@espy espy commented Mar 26, 2026

Overview

run-test.sh does npx playwright install --with-deps "$CLIENT", which is quite slow on GH CI. This PR is an attempt to avoid --with-deps and selectively install only the few things Playwright actually needs, according to this guide.

Testing recommendations

Run the CI on this PR and compare it to the CI runs for #9205, this one should be faster, especially on the browser-adapter tests, some of which (eg. this one) take over 5 minutes each (sometimes much more), most of which is installing Playwright deps.

Specifically, compare the Usage pages of the two runs, those show the cumulative time of all runs at the bottom.

Checklist

  • I am not a bot
  • This is my own work, I did not use AI, LLM's or similar technology for code or docs generation
  • Code is written and works correctly
  • Changes are covered by tests
  • Documentation changes were made in the docs folder

@janl
Copy link
Copy Markdown
Member

janl commented Mar 27, 2026

Host system is missing dependencies to run browsers. ║
║ Please install them with the following command:      ║
║                                                      ║
║     sudo npx playwright install-deps                 ║
║                                                      ║
║ Alternatively, use apt:                              ║
║     sudo apt-get install libwoff1\                   ║
║         libvpx9\                                     ║
║         libevent-2.1-7t64\                           ║
║         libopus0\                                    ║
║         libgstreamer-plugins-base1.0-0\              ║
║         libgstreamer-gl1.0-0\                        ║
║         libgstreamer-plugins-bad1.0-0\               ║
║         libflite1\                                   ║
║         libavif16\                                   ║
║         libharfbuzz-icu0\                            ║
║         libsecret-1-0\                               ║
║         libhyphen0\                                  ║
║         libwayland-server0\                          ║
║         libmanette-0.2-0\                            ║
║         libgles2\                                    ║
║         gstreamer1.0-libav                           ║
║                                                      ║
║ <3 Playwright Team                                

@espy espy force-pushed the ci-slimmer-playwright branch from 768c0da to 5a8170f Compare March 27, 2026 12:25
@espy espy force-pushed the ci-slimmer-playwright branch from 5a8170f to 8037812 Compare March 27, 2026 12:41
@espy
Copy link
Copy Markdown
Contributor Author

espy commented Mar 27, 2026

All green ✅

Turns out this PR only affects 4 tests, the combination of which seem a bit odd (see end of comment):

couchdb-browser (2.3, firefox, TYPE=find PLUGINS=pouchdb-find ADAPTERS=http npm test)
couchdb-browser (2.3, firefox, TYPE=mapreduce ADAPTERS=http npm test)
couchdb-browser (3.1, chromium, TYPE=mapreduce ADAPTERS=http npm test)
browser-adapter (chromium, indexeddb, TYPE=mapreduce npm test)

BUT! These go from ~8:30 to ~1:30 each compared to the baseline run.

First test run:

Cumulative test runtime is decreased from to 3h 17m 52s to 2h 53m 50s.
Total runtime is down from 9m 30s to 7m

Second test run:

Cumulative test runtime is decreased from to 3h 17m 52s to 2h 54m 50s.
Total runtime is down from 9m 30s to 6m 30s

This seems like a nice win.

Why does the combination seem odd?

I’d have expected similar tests to behave similarly, e.g. all playwright Chromium runs go through the same installation step, why are some consistently slower when the slow step happens in all of them? 🤔

browser-adapter (chromium, indexeddb, npm test)                                         4m 0s	
browser-adapter (chromium, indexeddb, TYPE=find PLUGINS=pouchdb-find npm test)          1m 12s	
browser-adapter (chromium, indexeddb, TYPE=mapreduce npm test)                          8m 53s
	
couchdb-browser (2.3, firefox, npm test)                                                5m 26s	
couchdb-browser (2.3, firefox, TYPE=find PLUGINS=pouchdb-find ADAPTERS=http npm test)   8m 58s	
couchdb-browser (2.3, firefox, TYPE=mapreduce ADAPTERS=http npm test)                   8m 55s

couchdb-browser (3.1, chromium, npm test)                                               3m 55s	
couchdb-browser (3.1, chromium, TYPE=find PLUGINS=pouchdb-find ADAPTERS=http npm test)  1m 15s	
couchdb-browser (3.1, chromium, TYPE=mapreduce ADAPTERS=http npm test)                  8m 28s

@janl janl merged commit 39b9f96 into apache:master Mar 27, 2026
172 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants