The built-in act_runner cache server binds to an interface unreachable from per-job container networks (container.network: "" is the default). ACTIONS_CACHE_URL ends up pointing at an unreachable IP, and every CI job burns ~9 minutes on:
::warning::Failed to restore: getCacheEntry failed: connect ETIMEDOUT 192.168.112.21:37051
::warning::Failed to save: reserveCache failed: connect ETIMEDOUT 192.168.112.21:37051
So even though python-package.yml enables cache: 'pip', the cache backend is unreachable, jobs hit pip install cold every time, and CI ends up ~4x slower than necessary.
Fix
Run a dedicated act_runner cache-server container on the same overlay network as the runner, and point the runner at it via external_server. Secret shared via ACT_RUNNER_EXTERNAL_SECRET env on both services (placeholder CHANGE_ME_SHARED_SECRET — replace with a real random value before deploy via Docker secret or env file).
Changes
poc/gitea/stack-compose.yml: add cache_server service (command: ["cache-server"]) on the gitea overlay with cache_data named volume; add ACT_RUNNER_EXTERNAL_SECRET env to runner.
poc/gitea/config.yaml: point cache.{host,port,external_server} at the new service, set external_secret.
Verification
Both YAMLs parse (PyYAML).
Service name gitea_cache_server resolves on the gitea overlay via Swarm service-name DNS.
The runner container reads the same external_secret from env as the cache-server reads from its env (deploy must keep these in sync).
Deploy notes
Generate a real shared secret: openssl rand -hex 32.
Replace CHANGE_ME_SHARED_SECRET in both places. The config is bound as a Swarm config; the cache-server env should be a Docker secret or host env, not the config.
docker stack deploy -c stack-compose.yml gitea.
Re-run a CI job and confirm cache restore/save log lines no longer ETIMEDOUT.
Related
Related: admin/brencher#15 — python-package.yml enables cache: 'pip' and was timing out for the reason this PR fixes.
Refs: gitea/actions/runs/16 jobs #248/249/250.
## Problem
The built-in `act_runner` cache server binds to an interface unreachable from per-job container networks (`container.network: ""` is the default). `ACTIONS_CACHE_URL` ends up pointing at an unreachable IP, and every CI job burns ~9 minutes on:
```
::warning::Failed to restore: getCacheEntry failed: connect ETIMEDOUT 192.168.112.21:37051
::warning::Failed to save: reserveCache failed: connect ETIMEDOUT 192.168.112.21:37051
```
Measured on `admin/brencher#15` (https://gitea.rudolf.keenetic.link/admin/brencher/actions/runs/16):
| Job | wall-clock | of which dead air on cache |
|---------|------------|----------------------------|
| 3.12.3 | 12m 40s | ~9m (271s × 2 timeouts) |
| 3.13 | 11m 13s | ~9m |
| 3.14 | 11m 17s | ~9m |
So even though `python-package.yml` enables `cache: 'pip'`, the cache backend is unreachable, jobs hit `pip install` cold every time, and CI ends up ~4x slower than necessary.
## Fix
Run a dedicated `act_runner cache-server` container on the same overlay network as the runner, and point the runner at it via `external_server`. Secret shared via `ACT_RUNNER_EXTERNAL_SECRET` env on both services (placeholder `CHANGE_ME_SHARED_SECRET` — replace with a real random value before deploy via Docker secret or env file).
## Changes
- `poc/gitea/stack-compose.yml`: add `cache_server` service (`command: ["cache-server"]`) on the `gitea` overlay with `cache_data` named volume; add `ACT_RUNNER_EXTERNAL_SECRET` env to `runner`.
- `poc/gitea/config.yaml`: point `cache.{host,port,external_server}` at the new service, set `external_secret`.
## Verification
- Both YAMLs parse (PyYAML).
- Service name `gitea_cache_server` resolves on the `gitea` overlay via Swarm service-name DNS.
- The runner container reads the same `external_secret` from env as the cache-server reads from its env (deploy must keep these in sync).
## Deploy notes
1. Generate a real shared secret: `openssl rand -hex 32`.
2. Replace `CHANGE_ME_SHARED_SECRET` in both places. The config is bound as a Swarm config; the cache-server env should be a Docker secret or host env, not the config.
3. `docker stack deploy -c stack-compose.yml gitea`.
4. Re-run a CI job and confirm cache `restore`/`save` log lines no longer ETIMEDOUT.
## Related
- Related: https://gitea.rudolf.keenetic.link/admin/brencher/pulls/15 — `python-package.yml` enables `cache: 'pip'` and was timing out for the reason this PR fixes.
- Refs: gitea/actions/runs/16 jobs #248/249/250.
Drop the brencher-state-proxy sidecar from hermes_infra -- it is
no longer needed. The sidecar existed to relay /state from
brencher.rudolf.keenetic.link into the admin overlay; that relay is
unnecessary since brencher ingress handles the path itself.
Changes vs the brencher-state-proxy commit that was merged in #4:
- delete hermes_squid/brencher-state-proxy.conf
- remove the brencher-state-proxy: service block from
hermes_squid/stack-compose.yml
- remove the brencher_state_proxy_conf: top-level config object
- drop brencher-state-proxy from the NO_PROXY / no_proxy lists
- update the surrounding comments
The built-in act_runner cache-server binds to an interface unreachable
from per-job container networks (default container.network: ""), so
ACTIONS_CACHE_URL resolves to 192.168.112.21:37051 and every job burns
~9 minutes on:
::warning::Failed to save: reserveCache failed: connect ETIMEDOUT
::warning::Failed to restore: getCacheEntry failed: connect ETIMEDOUT
Measured on PR #15 in admin/brencher (gitea/actions/runs/16):
each of 3 jobs ≈12 min wall-clock, of which 9 min is dead air waiting
for cache timeouts.
Run a dedicated act_runner cache-server on the same overlay network and
point the runner at it via external_server. secret shared via
ACT_RUNNER_EXTERNAL_SECRET env on both services.
Related: admin/brencher#15 (whose python-package.yml enables cache:'pip'
but currently gets no benefit because the cache backend is unreachable).
Refs: gitea/actions/runs/16 (job #248 logs)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
The built-in
act_runnercache server binds to an interface unreachable from per-job container networks (container.network: ""is the default).ACTIONS_CACHE_URLends up pointing at an unreachable IP, and every CI job burns ~9 minutes on:Measured on
admin/brencher#15(https://gitea.rudolf.keenetic.link/admin/brencher/actions/runs/16):So even though
python-package.ymlenablescache: 'pip', the cache backend is unreachable, jobs hitpip installcold every time, and CI ends up ~4x slower than necessary.Fix
Run a dedicated
act_runner cache-servercontainer on the same overlay network as the runner, and point the runner at it viaexternal_server. Secret shared viaACT_RUNNER_EXTERNAL_SECRETenv on both services (placeholderCHANGE_ME_SHARED_SECRET— replace with a real random value before deploy via Docker secret or env file).Changes
poc/gitea/stack-compose.yml: addcache_serverservice (command: ["cache-server"]) on thegiteaoverlay withcache_datanamed volume; addACT_RUNNER_EXTERNAL_SECRETenv torunner.poc/gitea/config.yaml: pointcache.{host,port,external_server}at the new service, setexternal_secret.Verification
gitea_cache_serverresolves on thegiteaoverlay via Swarm service-name DNS.external_secretfrom env as the cache-server reads from its env (deploy must keep these in sync).Deploy notes
openssl rand -hex 32.CHANGE_ME_SHARED_SECRETin both places. The config is bound as a Swarm config; the cache-server env should be a Docker secret or host env, not the config.docker stack deploy -c stack-compose.yml gitea.restore/savelog lines no longer ETIMEDOUT.Related
python-package.ymlenablescache: 'pip'and was timing out for the reason this PR fixes.The built-in act_runner cache-server binds to an interface unreachable from per-job container networks (default container.network: ""), so ACTIONS_CACHE_URL resolves to 192.168.112.21:37051 and every job burns ~9 minutes on: ::warning::Failed to save: reserveCache failed: connect ETIMEDOUT ::warning::Failed to restore: getCacheEntry failed: connect ETIMEDOUT Measured on PR #15 in admin/brencher (gitea/actions/runs/16): each of 3 jobs ≈12 min wall-clock, of which 9 min is dead air waiting for cache timeouts. Run a dedicated act_runner cache-server on the same overlay network and point the runner at it via external_server. secret shared via ACT_RUNNER_EXTERNAL_SECRET env on both services. Related: admin/brencher#15 (whose python-package.yml enables cache:'pip' but currently gets no benefit because the cache backend is unreachable). Refs: gitea/actions/runs/16 (job #248 logs)Pull request closed