Skip to content

Commit 115ad55

Browse files
committed
fix(release): allow Chromium sandbox in prerelease E2E
1 parent aa5bb5d commit 115ad55

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/release-prerelease.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,17 @@ jobs:
247247
run: pnpm install --frozen-lockfile
248248
- name: Setup Playwright
249249
run: pnpm -C e2e exec playwright install --with-deps chromium
250+
# Ubuntu 24.04 restricts unprivileged user namespaces through AppArmor.
251+
# The daemon launches the installed Chromium directly instead of through
252+
# Playwright. Restore user namespaces on this ephemeral runner so the real
253+
# Chromium sandbox remains enabled rather than disabling that protection.
254+
- name: Allow Chromium user namespaces on GitHub Ubuntu
255+
shell: bash
256+
run: |
257+
set -euo pipefail
258+
if sysctl kernel.apparmor_restrict_unprivileged_userns >/dev/null 2>&1; then
259+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
260+
fi
250261
- name: Prebuild workspace type declarations
251262
run: |
252263
pnpm --filter @open-design/daemon build

e2e/tests/packaged-smoke-workflow.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,6 +1549,11 @@ process.stdin.on("end", () => {
15491549
expect(e2eVitestGate).toContain("needs: metadata");
15501550
expect(e2eVitestGate).toContain("ref: ${{ needs.metadata.outputs.commit }}");
15511551
expect(e2eVitestGate).toContain("playwright install --with-deps chromium");
1552+
expect(e2eVitestGate).toContain("Allow Chromium user namespaces on GitHub Ubuntu");
1553+
expect(e2eVitestGate).toContain("kernel.apparmor_restrict_unprivileged_userns=0");
1554+
expect(e2eVitestGate).not.toContain("--no-sandbox");
1555+
expect(e2eVitestGate.indexOf("kernel.apparmor_restrict_unprivileged_userns=0"))
1556+
.toBeLessThan(e2eVitestGate.indexOf("pnpm --filter @open-design/e2e test"));
15521557
expect(e2eVitestGate).toContain("pnpm --filter @open-design/e2e test");
15531558

15541559
const daemonGate = sectionBetween(prerelease, " daemon_unit_tests:", " verify:");

0 commit comments

Comments
 (0)