Skip to content

ci: let bubblewrap create a user namespace on the runner - #84

Merged
matbrgz merged 1 commit into
masterfrom
fix/ci-judge-userns
Sep 13, 2026
Merged

matbrgz merged 1 commit into
masterfrom
fix/ci-judge-userns

Conversation

@matbrgz

@matbrgz matbrgz commented Sep 13, 2026

Copy link
Copy Markdown
Member

O job judge-image falhou na primeira execução contra um master que já tem o sandbox: 820 testes, 48 pulados com bubblewrap cannot create a sandbox here (user namespaces unavailable?), e o --fail-on-skipped transformou isso em falha.

Que é o job funcionando como projetado — a flag existe exatamente para que um sandbox que não sobe apareça como falha, e não como build verde por cima de 48 testes silenciosamente pulados.

A causa é o host, não o container: runners Ubuntu 24.04 vêm com kernel.apparmor_restrict_unprivileged_userns=1, e AppArmor é aplicado no host — então --privileged sozinho não dá user namespace ao bwrap. O sysctl é relaxado antes da execução, e o confinamento apparmor/seccomp é removido explicitamente em vez de contar com ele como efeito colateral do --privileged.

Os dois sysctls levam || true: nenhum dos dois existe em toda imagem de runner, e a ausência deles não é problema por si. Quem decide se o sandbox realmente subiu é o --fail-on-skipped, não o sucesso dessas linhas.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Pvf2R8xtgbWQm1wRvjBqQY

The judge-image job failed its first run against a master that has the
sandbox: 820 tests, 48 of them skipped with "bubblewrap cannot create a
sandbox here (user namespaces unavailable?)", and --fail-on-skipped turned
that into a failure.

Which is the job working as intended -- that flag exists precisely so a
sandbox that cannot start reads as a failure rather than as a green build
over 48 quietly skipped tests.

The cause is the host, not the container: Ubuntu 24.04 runners set
kernel.apparmor_restrict_unprivileged_userns=1, and AppArmor is enforced
on the host, so --privileged alone does not get bwrap a user namespace.
The sysctl is relaxed before the run, and apparmor/seccomp confinement is
dropped explicitly rather than relied on as a side effect of --privileged.

Both sysctls are `|| true`: neither knob exists on every runner image, and
their absence is not itself a problem. Whether the sandbox actually came
up is decided by --fail-on-skipped, not by these lines succeeding.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pvf2R8xtgbWQm1wRvjBqQY
@matbrgz
matbrgz merged commit dca8070 into master Sep 13, 2026
3 checks passed
@matbrgz
matbrgz deleted the fix/ci-judge-userns branch September 13, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant