Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ops/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,16 @@ FROM selkies-${TARGETARCH} AS selkies
# a Go test fails if the two drift.
FROM node:22-trixie-slim AS driver
ARG PLAYWRIGHT_CLI_VERSION=0.1.23
ARG PLAYWRIGHT_CORE_VERSION=1.65.0
# No playwright browser is ever downloaded, here or at runtime: the only browser
# is our stealth-Chromium, which the driver reaches over CDP.
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 NO_UPDATE_NOTIFIER=1
# Replace the CLI's prerelease dependency until it ships the Node-side settle wait.
# Install in its own tree so both the CLI and the MCP child resolve the fixed core.
RUN npm install -g --prefix=/opt/playwright-cli \
@playwright/cli@${PLAYWRIGHT_CLI_VERSION} \
&& npm install --prefix=/opt/playwright-cli/lib/node_modules/@playwright/cli --save-exact --omit=dev \
playwright@${PLAYWRIGHT_CORE_VERSION} playwright-core@${PLAYWRIGHT_CORE_VERSION} \
&& npm cache clean --force \
&& /opt/playwright-cli/bin/playwright-cli --version \
&& test -f /opt/playwright-cli/lib/node_modules/@playwright/cli/node_modules/playwright/cli.js
Expand Down
1 change: 1 addition & 0 deletions packages/browser/versions.env
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ BROWSER_SHA256_ARM64=1ba199ffac7c3a69c5af033e9ea047e38c42411415a38d5e4782695e92a
# shas above it is a duplicated literal there (a Dockerfile ARG cannot read this
# file); a Go test fails if the two drift.
PLAYWRIGHT_CLI_VERSION=0.1.23
PLAYWRIGHT_CORE_VERSION=1.65.0

# sccache cache cap on the mounted volume (both targets' worth).
SCCACHE_CACHE_SIZE=150G
5 changes: 5 additions & 0 deletions packages/cuttle/internal/fingerprint/versions_pin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,11 @@ func TestBundledPlaywrightCLIPin(t *testing.T) {
if m[1] != want {
t.Errorf("Dockerfile ARG PLAYWRIGHT_CLI_VERSION=%s but versions.env PLAYWRIGHT_CLI_VERSION=%s", m[1], want)
}
core := versionsEnvValue(t, "PLAYWRIGHT_CORE_VERSION")
m = regexp.MustCompile(`ARG PLAYWRIGHT_CORE_VERSION=(\S+)`).FindStringSubmatch(string(dockerfile))
if core == "" || m == nil || m[1] != core {
t.Errorf("Dockerfile PLAYWRIGHT_CORE_VERSION must match versions.env %q", core)
}
if cli.BundledPlaywrightCLIVersion != want {
t.Errorf("cli.BundledPlaywrightCLIVersion=%s but versions.env PLAYWRIGHT_CLI_VERSION=%s - the "+
"briefing would name a driver version the image does not bundle",
Expand Down
Loading