From 3b372b4a9148d630ea27f34c6246369d3cf80ccf Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Thu, 29 Oct 2026 23:57:23 +1100 Subject: [PATCH] ci(deploy): stop installing ripgrep and setting sysctl from the gate The deploy gate runs on a self-hosted runner under an unprivileged user, so the sudo apt-get install and sudo sysctl steps fail. Both are host provisioning: ripgrep is installed on the runner host and the userns restriction belongs in sysctl.d. The namespace check stays, without sudo. --- .github/workflows/deploy.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 062a86128..c24e82534 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -84,17 +84,11 @@ jobs: git branch main origin/main fi - - name: Install ripgrep - run: sudo apt-get update && sudo apt-get install -y --no-install-recommends ripgrep - - # Extensions run in an unprivileged user and network namespace, which - # Ubuntu 24.04 runners forbid through AppArmor by default. - - name: Allow unprivileged user namespaces - run: | - if [ -e /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]; then - sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 - fi - unshare --user --map-root-user --net true + # ripgrep and the unprivileged-userns sysctl are provisioned on the host. + # A self-hosted runner should not need sudo, and installing a package on + # every run is not the gate's job. + - name: Verify unprivileged user namespaces + run: unshare --user --map-root-user --net true # The gate's uncached `go test ./...` runs the Docker-backed tests that # -short skips, and those start a container from alpine:3. A fresh runner