ci: cut the fast-path network by environment, not unshare
Build / build (pull_request) Successful in 34s
Molecule / molecule (pull_request) Successful in 16s
Lint / lint (pull_request) Successful in 1m38s

The runner's job container refuses unshare, even with a user namespace, so the
fast path sets PIP_NO_INDEX and a dead proxy instead; a raw socket is not caught.

Assisted-by: Claude Code
This commit is contained in:
Defame1297 committed 2026-11-26 22:48:51 +00:00
1 parent 7c148e858d
commit 4d5042a31f
5 files changed
+35 -28

No files matched your search

+2 -2
View File
@@ -66,8 +66,8 @@ Read `.gitea/workflows/molecule.yml` for the full command.
`/opt/ci-pins.sha256` lists the five pin files by their checkout-relative path, so `sha256sum -c` runs in the checkout root. When
the checkout's `requirements-dev.txt`, `requirements-dev.lock`, `requirements.yml`, `extensions/molecule/requirements.yml` and `.pre-commit-config.yaml` match, the baked tools and
collections are used as they are, and Lint and Build run their tools (all but the script tests) without
network, so a tool that downloads at run time fails the job. When a pull request changes a pin the check fails and the job installs the pinned
collections are used as they are, and Lint and Build cut the network by environment (proxy variables and
`PIP_NO_INDEX`) for all but the script tests, so a tool that downloads at run time fails the job. When a pull request changes a pin the check fails and the job installs the pinned
tools and collections itself for that run
(slower, same result), until the image is rebuilt from `main`. `lint.yml`, `build.yml`, `molecule.yml` and `gitea-release-key.yml`
are the real consumers.