fix(images): pair chrome + chromedriver via chrome-for-testing#238
fix(images): pair chrome + chromedriver via chrome-for-testing#238sjmiller609 wants to merge 4 commits into
Conversation
Both chromium-headful and chromium-headless previously installed chromium from the rolling ppa:xtradeb/apps PPA while pinning chromedriver to a hardcoded version. Once the PPA upgraded chromium past the pinned chromedriver major, every WebDriver/BiDi e2e test failed with "ChromeDriver only supports Chrome version N, Current browser version is N+M". Install both binaries from chrome-for-testing at one shared CHROME_VERSION so they cannot drift apart, and rename the chrome binary to "chromium" so the existing pgrep/pkill -x chromium calls in chromium-launcher continue to match. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Chrome for Testing reads enterprise policies from /etc/opt/chrome_for_testing/policies/managed, but kernel-images-api and the shared policy.json write to /etc/chromium/policies/managed. Without a bridge, ExtensionInstallForcelist policies never reach the browser and TestEnterpriseExtensionInstallation fails. Symlink the chrome-for-testing path to the existing /etc/chromium path so policies flow through unchanged. No Go-side changes required. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The apt-installed chromium previously pulled in x11-xserver-utils (which provides the xrandr binary) transitively. Now that chrome comes from chrome-for-testing, that dep has to be requested explicitly or PATCH /display and the resolution-aware tests fail with "failed to get current display resolution". Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Firetiger deploy monitoring skipped This PR didn't match the auto-monitor filter configured on your GitHub connection:
Reason: This PR modifies Docker images for Chrome/Chromedriver (packages/images/) and does not change kernel API endpoints (packages/api/cmd/api/) or Temporal workflows (packages/api/lib/temporal). To monitor this PR anyway, reply with |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a2959e0. Configure here.
Add libdbus-1-3, libglib2.0-0, libgtk-3-0, libxext6 — listed in chrome-for-testing's deb.deps but only present transitively in the headless image. Mirrors the headful image's explicit set so neither relies on transitive providers.

Summary
chromium-headfulandchromium-headlesspreviously installed chromium from the rollingppa:xtradeb/appsPPA while pinningchromedriverto a hardcoded version (146.0.7680.165). Once the PPA upgraded chromium past the pinned chromedriver major, every WebDriver/BiDi e2e test (TestBidiSelenium,TestBidiVibium,TestBidiPuppeteer,TestBidiWebSocket,TestBidiHTTPSession) failed with:This swaps both images over to installing chrome + chromedriver as a matched pair from
chrome-for-testingat a single sharedCHROME_VERSIONARG. Bumping the version (or any future drift) is now a one-line change that updates both binaries atomically.Changes
Three commits, all needed to get the existing test suite green on the new binaries:
ppa:xtradeb/appsand the apt-installedchromium; downloadchrome-linux64.zip+chromedriver-linux64.zipfromstorage.googleapis.com/chrome-for-testing-public/${CHROME_VERSION}/and install both at/opt/chrome-for-testing/and/usr/local/bin/chromedriver. Rename the chrome binary tochromiumand symlink/usr/bin/chromiumso existing callers — and thepgrep/pkill -x chromiumcalls inchromium-launcher— keep working unchanged. In the headful image, also explicitly install the runtime libs listed in chrome-for-testing'sdeb.depsthat were previously pulled in transitively byapt install chromium./etc/chromium/policies— Chrome for Testing reads managed policies from/etc/opt/chrome_for_testing/policies/managed, butkernel-images-apiand the sharedpolicy.jsonwrite to/etc/chromium/policies/managed. Symlink in both images so policy writes flow through unchanged with no Go-side changes. Without this,TestEnterpriseExtensionInstallationfails because forced extensions never reach the browser.x11-xserver-utilsto the headless image — the apt-installedchromiumwas transitively pulling inx11-xserver-utils(which provides thexrandrbinary). Without it,PATCH /displayand every resolution-aware test fails with"failed to get current display resolution"(TestExtensionViewportThenCDPConnection,TestInputEndpointsSmoke,TestScreenshotHeadless,TestDisplayResolutionChange). The headful image already had it explicitly.Verified
--versionon both binaries (matched),chrome --dump-dom https://example.com(renders),chromedriver /status(reports paired version). Renaming the chrome binary tochromiumkeeps/proc/<pid>/commaschromiumfor both the parent and all renderer/zygote children, sopkill -x chromiumcleans up cleanly.build-headful,build-headless,scan,test, Socket Security).Test plan
chromium-headfulandchromium-headlessserver-test.yamltestjob passes (including the previously-failingTestBidi*,TestEnterpriseExtensionInstallation, and the resolution-aware tests)Note
Medium Risk
Updates both
chromium-headfulandchromium-headlessbase images to fetch browser binaries from an external archive and changes runtime library/policy paths, which can break CI/browser automation if versions or deps are wrong.Overview
Both
chromium-headfulandchromium-headlessimages stop installingchromiumfrom theppa:xtradeb/appsPPA and instead download a matched Chrome + ChromeDriver pair fromchrome-for-testingvia a singleCHROME_VERSIONbuild arg, renaming the browser binary tochromiumand symlinking it to/usr/bin/chromium.To keep existing behavior working, the images add required runtime deps (plus
unzipin headless), and symlink Chrome-for-Testing’s managed policy directory (/etc/opt/chrome_for_testing/policies) to the existing/etc/chromium/policieslocation; headless also explicitly installsx11-xserver-utilsforxrandr.Reviewed by Cursor Bugbot for commit 9e0d264. Bugbot is set up for automated code reviews on this repo. Configure here.