From c76fddfb1cf273d7d7d385a1c90ca59f36d5d506 Mon Sep 17 00:00:00 2001 From: Christoph Mathys Date: Thu, 16 Jul 2026 13:18:49 +0000 Subject: [PATCH 1/4] chore: update to Debian 13 and remove --add-host from devcontainer config --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer.json | 14 +++++--------- features/test/playwright-deps/scenarios.json | 7 ++----- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index adb8dfd..ce7e2d7 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1 +1 @@ -FROM mcr.microsoft.com/devcontainers/base:1.0.20-bookworm +FROM mcr.microsoft.com/devcontainers/base:2.1.9-trixie diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 86816b4..a3a2cc0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,14 +1,8 @@ { "name": "PF dev-feat DEV", "build": { - "dockerfile": "Dockerfile", - "options": [ - "--add-host=host.docker.internal:host-gateway" - ] + "dockerfile": "Dockerfile" }, - "runArgs": [ - "--add-host=host.docker.internal:host-gateway" - ], "containerEnv": { "GOMODCACHE": "${containerWorkspaceFolder}/.go_cache" }, @@ -16,7 +10,9 @@ "ghcr.io/postfinance/devcontainer-features/go:1.0.0": { "version": "1.25.9" }, - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { + "moby": false + }, "ghcr.io/devcontainers-extra/features/devcontainers-cli:1": {} }, "customizations": { @@ -26,4 +22,4 @@ ] } } -} \ No newline at end of file +} diff --git a/features/test/playwright-deps/scenarios.json b/features/test/playwright-deps/scenarios.json index d2dde65..b76cd44 100644 --- a/features/test/playwright-deps/scenarios.json +++ b/features/test/playwright-deps/scenarios.json @@ -1,10 +1,7 @@ { "install": { "build": { - "dockerfile": "Dockerfile", - "options": [ - "--add-host=host.docker.internal:host-gateway" - ] + "dockerfile": "Dockerfile" }, "features": { "./playwright-deps": { @@ -14,4 +11,4 @@ } } } -} \ No newline at end of file +} From f31e27e1a62d9296084e5b473ebcf3a64ffad740 Mon Sep 17 00:00:00 2001 From: Christoph Mathys Date: Thu, 16 Jul 2026 13:20:38 +0000 Subject: [PATCH 2/4] docs(playwright-deps): Suggest to use Playwright server mode with host browser --- features/src/playwright-deps/NOTES.md | 20 ++++++++++++++++++++ features/src/playwright-deps/README.md | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/features/src/playwright-deps/NOTES.md b/features/src/playwright-deps/NOTES.md index 05dba33..3bcf5fb 100644 --- a/features/src/playwright-deps/NOTES.md +++ b/features/src/playwright-deps/NOTES.md @@ -26,3 +26,23 @@ Also don't forget to add `.ms-playwright` to your `.gitignore` file. ### Download URL from within Playwright To change the downloads that Playwright does to a custom remote, you can adjust the `PLAYWRIGHT_DOWNLOAD_HOST` environment variable to eg. `https://mycompany.com/artifactory/playwright-remote/`. You might also want to increase the `PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT` to something like `300000`. + +### Poor performance of `playwright test --ui` + +If you find the UI launched with `playwright test --ui` too slow, you can run +Playwright in server mode and connect from your host browser. + +For VS Code, you only need to launch Playwright in server mode: + +```sh +npx playwright test --ui-host 0.0.0.0 --ui-port 8085 +``` + +If you are using the devcontainer CLI to build the container: + +1. In your `devcontainer.json`, add a port forward: + ```json + "appPort": [ "32222:8085" ] + ``` +2. Launch Playwright in server mode: `npx playwright test --ui-host 0.0.0.0 --ui-port 8085` +3. Access Playwright from your host browser: diff --git a/features/src/playwright-deps/README.md b/features/src/playwright-deps/README.md index 4911d8a..e6708f3 100755 --- a/features/src/playwright-deps/README.md +++ b/features/src/playwright-deps/README.md @@ -50,3 +50,23 @@ Also don't forget to add `.ms-playwright` to your `.gitignore` file. ### Download URL from within Playwright To change the downloads that Playwright does to a custom remote, you can adjust the `PLAYWRIGHT_DOWNLOAD_HOST` environment variable to eg. `https://mycompany.com/artifactory/playwright-remote/`. You might also want to increase the `PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT` to something like `300000`. + +### Poor performance of `playwright test --ui` + +If you find the UI launched with `playwright test --ui` too slow, you can run +Playwright in server mode and connect from your host browser. + +For VS Code, you only need to launch Playwright in server mode: + +```sh +npx playwright test --ui-host 0.0.0.0 --ui-port 8085 +``` + +If you are using the devcontainer CLI to build the container: + +1. In your `devcontainer.json`, add a port forward: + ```json + "appPort": [ "32222:8085" ] + ``` +2. Launch Playwright in server mode: `npx playwright test --ui-host 0.0.0.0 --ui-port 8085` +3. Access Playwright from your host browser: From 9b6caad37d9afaa2377b6bc8d10cfab5a32037a4 Mon Sep 17 00:00:00 2001 From: Christoph Mathys Date: Thu, 16 Jul 2026 13:30:30 +0000 Subject: [PATCH 3/4] chore(playwright-deps): sync list of browser dependencies with upstream --- features/src/playwright-deps/installer.go | 121 ++++++++++++++++++ .../test/playwright-deps/test-images.json | 6 +- 2 files changed, 125 insertions(+), 2 deletions(-) diff --git a/features/src/playwright-deps/installer.go b/features/src/playwright-deps/installer.go index 7314bac..e8ff7ef 100644 --- a/features/src/playwright-deps/installer.go +++ b/features/src/playwright-deps/installer.go @@ -353,6 +353,7 @@ var dependencies = map[string]map[string][]string{ "firefox": []string{ "libasound2t64", "libatk1.0-0t64", + "libavcodec60", "libcairo-gobject2", "libcairo2", "libdbus-1-3", @@ -431,6 +432,125 @@ var dependencies = map[string]map[string][]string{ "libavif16", }, }, + "ubuntu26": { + "tools": []string{ + "xvfb", + "fonts-noto-color-emoji", + "fonts-unifont", + "libfontconfig1", + "libfreetype6", + "xfonts-cyrillic", + "xfonts-scalable", + "fonts-liberation", + "fonts-ipafont-gothic", + "fonts-wqy-zenhei", + "fonts-tlwg-loma-otf", + "fonts-freefont-ttf", + }, + "chromium": []string{ + "libasound2t64", + "libatk-bridge2.0-0t64", + "libatk1.0-0t64", + "libatspi2.0-0t64", + "libcairo2", + "libcups2t64", + "libdbus-1-3", + "libdrm2", + "libgbm1", + "libglib2.0-0t64", + "libnspr4", + "libnss3", + "libpango-1.0-0", + "libx11-6", + "libxcb1", + "libxcomposite1", + "libxdamage1", + "libxext6", + "libxfixes3", + "libxkbcommon0", + "libxrandr2", + }, + "firefox": []string{ + "libasound2t64", + "libatk1.0-0t64", + "libavcodec62", + "libcairo-gobject2", + "libcairo2", + "libdbus-1-3", + "libfontconfig1", + "libfreetype6", + "libgdk-pixbuf-2.0-0", + "libglib2.0-0t64", + "libgtk-3-0t64", + "libpango-1.0-0", + "libpangocairo-1.0-0", + "libx11-6", + "libx11-xcb1", + "libxcb-shm0", + "libxcb1", + "libxcomposite1", + "libxcursor1", + "libxdamage1", + "libxext6", + "libxfixes3", + "libxi6", + "libxrandr2", + "libxrender1", + }, + "webkit": []string{ + "gstreamer1.0-libav", + "gstreamer1.0-plugins-bad", + "gstreamer1.0-plugins-base", + "gstreamer1.0-plugins-good", + "libicu78", + "libatomic1", + "libatk-bridge2.0-0t64", + "libatk1.0-0t64", + "libcairo-gobject2", + "libcairo2", + "libdbus-1-3", + "libdrm2", + "libenchant-2-2", + "libepoxy0", + "libevent-2.1-7t64", + "libflite1", + "libfontconfig1", + "libfreetype6", + "libgbm1", + "libgdk-pixbuf-2.0-0", + "libgles2", + "libglib2.0-0t64", + "libgstreamer-gl1.0-0", + "libgstreamer-plugins-bad1.0-0", + "libgstreamer-plugins-base1.0-0", + "libgstreamer1.0-0", + "libgtk-4-1", + "libharfbuzz-icu0", + "libharfbuzz0b", + "libhyphen0", + "libjpeg-turbo8", + "liblcms2-2", + "libmanette-0.2-0", + "libopus0", + "libpango-1.0-0", + "libpangocairo-1.0-0", + "libpng16-16t64", + "libsecret-1-0", + "libvpx12", + "libwayland-client0", + "libwayland-egl1", + "libwayland-server0", + "libwebp7", + "libwebpdemux2", + "libwoff1", + "libx11-6", + "libxkbcommon0", + "libxml2-16", + "libxslt1.1", + "libx264-165", + "libavif16", + }, + }, "debian11": { "tools": []string{ @@ -723,6 +843,7 @@ var dependencies = map[string]map[string][]string{ "firefox": []string{ "libasound2", "libatk1.0-0t64", + "libavcodec61", "libcairo-gobject2", "libcairo2", "libdbus-1-3", diff --git a/features/test/playwright-deps/test-images.json b/features/test/playwright-deps/test-images.json index baaeb21..44dee96 100644 --- a/features/test/playwright-deps/test-images.json +++ b/features/test/playwright-deps/test-images.json @@ -1,5 +1,7 @@ [ "mcr.microsoft.com/devcontainers/base:debian-11", "mcr.microsoft.com/devcontainers/base:debian-12", - "mcr.microsoft.com/devcontainers/base:ubuntu-24.04" -] \ No newline at end of file + "mcr.microsoft.com/devcontainers/base:debian-13", + "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", + "mcr.microsoft.com/devcontainers/base:ubuntu-26.04" +] From 982c14ef3272e458b34d99ad09e3027b2643df01 Mon Sep 17 00:00:00 2001 From: Christoph Mathys Date: Thu, 16 Jul 2026 13:44:14 +0000 Subject: [PATCH 4/4] chore(playwright-deps): follow upstream and drop Debian 11 support --- features/src/playwright-deps/installer.go | 126 ------------------ .../test/playwright-deps/test-images.json | 1 - 2 files changed, 127 deletions(-) diff --git a/features/src/playwright-deps/installer.go b/features/src/playwright-deps/installer.go index e8ff7ef..bc01076 100644 --- a/features/src/playwright-deps/installer.go +++ b/features/src/playwright-deps/installer.go @@ -552,132 +552,6 @@ var dependencies = map[string]map[string][]string{ }, }, - "debian11": { - "tools": []string{ - "xvfb", - "fonts-noto-color-emoji", - "fonts-unifont", - "libfontconfig1", - "libfreetype6", - "xfonts-cyrillic", - "xfonts-scalable", - "fonts-liberation", - "fonts-ipafont-gothic", - "fonts-wqy-zenhei", - "fonts-tlwg-loma-otf", - "fonts-freefont-ttf", - }, - "chromium": []string{ - "libasound2", - "libatk-bridge2.0-0", - "libatk1.0-0", - "libatspi2.0-0", - "libcairo2", - "libcups2", - "libdbus-1-3", - "libdrm2", - "libgbm1", - "libglib2.0-0", - "libnspr4", - "libnss3", - "libpango-1.0-0", - "libwayland-client0", - "libx11-6", - "libxcb1", - "libxcomposite1", - "libxdamage1", - "libxext6", - "libxfixes3", - "libxkbcommon0", - "libxrandr2", - }, - "firefox": []string{ - "libasound2", - "libatk1.0-0", - "libcairo-gobject2", - "libcairo2", - "libdbus-1-3", - "libdbus-glib-1-2", - "libfontconfig1", - "libfreetype6", - "libgdk-pixbuf-2.0-0", - "libglib2.0-0", - "libgtk-3-0", - "libharfbuzz0b", - "libpango-1.0-0", - "libpangocairo-1.0-0", - "libx11-6", - "libx11-xcb1", - "libxcb-shm0", - "libxcb1", - "libxcomposite1", - "libxcursor1", - "libxdamage1", - "libxext6", - "libxfixes3", - "libxi6", - "libxrandr2", - "libxrender1", - "libxtst6", - }, - "webkit": []string{ - "gstreamer1.0-libav", - "gstreamer1.0-plugins-bad", - "gstreamer1.0-plugins-base", - "gstreamer1.0-plugins-good", - "libatk-bridge2.0-0", - "libatk1.0-0", - "libcairo2", - "libdbus-1-3", - "libdrm2", - "libegl1", - "libenchant-2-2", - "libepoxy0", - "libevdev2", - "libfontconfig1", - "libfreetype6", - "libgbm1", - "libgdk-pixbuf-2.0-0", - "libgles2", - "libglib2.0-0", - "libglx0", - "libgstreamer-gl1.0-0", - "libgstreamer-plugins-base1.0-0", - "libgstreamer1.0-0", - "libgtk-3-0", - "libgudev-1.0-0", - "libharfbuzz-icu0", - "libharfbuzz0b", - "libhyphen0", - "libicu67", - "libjpeg62-turbo", - "liblcms2-2", - "libmanette-0.2-0", - "libnghttp2-14", - "libnotify4", - "libopengl0", - "libopenjp2-7", - "libopus0", - "libpango-1.0-0", - "libpng16-16", - "libproxy1v5", - "libsecret-1-0", - "libwayland-client0", - "libwayland-egl1", - "libwayland-server0", - "libwebp6", - "libwebpdemux2", - "libwoff1", - "libx11-6", - "libxcomposite1", - "libxdamage1", - "libxkbcommon0", - "libxml2", - "libxslt1.1", - "libatomic1", - "libevent-2.1-7", - }, - }, "debian12": { "tools": []string{ "xvfb", diff --git a/features/test/playwright-deps/test-images.json b/features/test/playwright-deps/test-images.json index 44dee96..531cc48 100644 --- a/features/test/playwright-deps/test-images.json +++ b/features/test/playwright-deps/test-images.json @@ -1,5 +1,4 @@ [ - "mcr.microsoft.com/devcontainers/base:debian-11", "mcr.microsoft.com/devcontainers/base:debian-12", "mcr.microsoft.com/devcontainers/base:debian-13", "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",