ci: cut the fast-path network by environment, not unshare
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:
1 parent
7c148e858d
commit
4d5042a31f
5 files changed
+35
-28
No files matched your search
@@ -57,12 +57,14 @@ issue.
|
||||
`.pre-commit-config.yaml` takes the slow path, which installs the pinned tools and collections.
|
||||
*Why:* a pull request is tested on its own pins, and an unchanged one starts in seconds.
|
||||
*Held:* control: the "Check the baked tooling against the pins" step.
|
||||
- **On the fast path the tool steps run in a network namespace without network** (`unshare -rn`
|
||||
through `$OFFLINE`), except "Test the repository scripts", whose fake registry needs loopback;
|
||||
the slow path keeps network. *Why:* a runtime download is a bake-in defect and must fail the
|
||||
job, not silently slow it. *Held:* control for the steps that carry the `$OFFLINE` prefix set
|
||||
by the "Check the baked tooling against the pins" step; review that every new tool step
|
||||
carries it.
|
||||
- **On the fast path the network is cut by environment**: `PIP_NO_INDEX=1`, the proxy variables
|
||||
set to a dead local port and `no_proxy` empty, for every later step except "Test the repository
|
||||
scripts", which unsets them for its fake registry on loopback; the slow path keeps network.
|
||||
*Why:* a runtime download is a bake-in defect and must fail the job, not silently slow it.
|
||||
*Held:* control, set by the "Check the baked tooling against the pins" step, for pip, curl, git
|
||||
over HTTPS and Python's urllib or requests (anything honouring `PIP_NO_INDEX` or the proxy
|
||||
variables); review for a raw socket or a tool that ignores the proxy variables, and for the
|
||||
script tests.
|
||||
- **Triggers:** both run on pull requests to `main` and on manual dispatch; Build also runs on
|
||||
`v*` tags, where it checks the tag against `galaxy.yml`. *Why:* the tag is what consumers
|
||||
install. *Held:* review.
|
||||
|
||||
Reference in new issue
Block a user