ops: push-gated CI live (12+2 suites, red-test proven, merge gate on); fail-closed config validators shipped to gateway+chat and proven; three backfilled incident write-ups (yaml outage, Loomio invite blast, stale-image deploy) + the 69-var portal env manifest

This commit is contained in:
inference-bot committed 2026-11-11 04:13:00 +00:00
1 parent 2c38f4d2c3
commit 206c3d5379
6 files changed
+698 -28

No files matched your search

+54 -28
View File
@@ -1,8 +1,9 @@
# Woodpecker CI (server + agent)
Self-hosted CI for the co-op's repos. **As of 2026-11-04 the CI is installed but
NOT working end to end** — read the *Current state* section before trusting it for
anything.
Self-hosted CI for the co-op's repos. **As of 2026-11-11 the CI is WORKING
end to end for push-gated test runs** — `co-op/docs` (manual, build+deploy),
`code/member-portal` and `code/admin-panel` (push-triggered test gating). Read
the *Current state* section for what is proven and the traps that remain.
Two Cloudron apps, added 2026-11-03:
@@ -54,41 +55,66 @@ CLI, and a pinned MkDocs toolchain at `/opt/docs-venv`. It **runs as root**
`publishing/requirements.txt`; **keep the two in step** when the docs toolchain
changes.
## Current state (2026-11-11): push-gated test CI is live
- **The server-side gRPC 500 was never the blocker.** The agent's `Next`
long-poll is cut short by the platform proxy every ~10 minutes (nginx
`upstream timed out`, `could not find named location "@grpc_unavailable"`)
and the agent retries — pipelines are collected and executed regardless.
Re-confirmed 2026-11-11: the 500s continue in the log while push-triggered
pipelines run green. Do not chase it.
- **API access:** a personal token for `inference-admin` lives at
`/home/ubuntu/.hermes/woodpecker.key` (mode 600). Repo enablement is
`POST /api/repos?forge_remote_id=<gitea repo id>` (query param, not body);
a manual run is `POST /api/repos/<id>/pipelines` with `{"branch": "..."}`.
- **Enabled repos:** `co-op/docs` (id 1), `code/member-portal` (id 2),
`code/admin-panel` (id 3). Note `co-op/member-portal` is a Gitea REDIRECT to
`code/member-portal` — the canonical repo lives in the `code` org (Gitea id 6).
- **Test gating (added 2026-11-11):** `.woodpecker.yml` on both apps' default
branches runs their EXISTING suites on every push (12 portal test files;
admin-panel guest-guard test + 4 page-JS harnesses via the vendored
`tests/check-page-js.sh`). Gitea branch protection on `main` of both repos
now requires the status context `ci/woodpecker/push/woodpecker` to merge.
- **Proven with real output:** first push runs green (portal tests step: 439
log lines ending "all portal test suites green"; all four harnesses OK on
the panel), and a deliberately broken assertion on a branch (`ci-red-test`)
produced pipeline #2 **failure** with the failing status context on Gitea —
the gate signal works. The branch was deleted after the proof.
- **The agent's python is 3.14** (agent image base) — the portal's PINNED
requirements (pydantic 2.9.2, psycopg2-binary 2.9.9) have no cp314 wheels,
so the portal pipeline installs a bounded-range subset (fastapi/httpx/PyJWT/
slowapi/cryptography) instead of `-r requirements.txt`. See
`code/member-portal/.woodpecker.yml` for the rationale.
## When a pipeline runs (and when it does not)
- **Manual-trigger only.** Nothing here fires on push; a pipeline is started by
hand from the Woodpecker UI.
- **The pipeline is not yet green end to end.**
- `co-op/docs`: **manual-trigger only** by deliberate decision (the poll
watcher remains the live auto-deploy path until the operator says otherwise).
- `code/member-portal`, `code/admin-panel`: fire on every **push** (any
branch) and can also be triggered manually.
- **`git-lfs` is required by the clone step.** Woodpecker runs `git lfs fetch`
after cloning, so a clone step fails with
`git: 'lfs' is not a git command` on any image without it — this was added to
the agent image on 2026-11-04. If a rebuild ever drops it, clones break again.
## Current state (2026-11-04): installed, agent connected, cannot run jobs
## Historical state (2026-11-04): installed, agent connected, could not run jobs
- The server is up — `https://ci.inference.coop/` serves the Woodpecker UI.
- The agent app is `running`/`healthy` and its health endpoint answers — **but
that is liveness, not capability.** The log shows the agent's **gRPC job-collection
long-poll failing continuously**: the server answers the agent's RPC with
**HTTP 500** (an nginx `text/html` 500 body), so the agent retries with backoff
and **never receives work**.
- A healthy agent that cannot collect jobs is the exact trap to avoid reading as
progress. Score a CI worker by **the route that delivers it work**, not by its
health RPC.
Superseded by the section above. Kept because each entry was a lesson:
the health endpoint lied by omission (liveness, not capability), the missing
git-lfs broke every clone, the missing repo secret (`cloudron_token`) made the
config fail to PARSE with the reason visible ONLY in the web UI, and the gRPC
500s were misread twice as the blocker before pipeline #2 proved otherwise.
The repo-enablement login gate (operator completes Gitea OAuth once) was
cleared the same day: the `inference-admin` user exists with admin rights.
**Unresolved / needs an operator:** the server-side gRPC 500. Until the server
answers the agent's stream, no pipeline can execute regardless of repository
configuration. This is a server-side (or platform-proxy) problem, not an agent
image problem.
## Enabling a repo (known gate — cleared 2026-11-04)
## Enabling a repo (known gate)
- Repos are connected through the **Gitea** source (`WOODPECKER_GITEA`). Enabling
a repo requires the repo owner to log in to Woodpecker with **Gitea OAuth** and
activate it. Standing up that OAuth login source is an **operator step**
(creating the Gitea OAuth application needs `write:user`, which the bot's Gitea
token does not have).
- Repos are connected through the **Gitea** source (`WOODPECKER_GITEA`). The
OAuth login source was stood up by the operator and the `inference-admin`
user exists (admin). Enabling further repos is now a pure API call (see
*Current state*), not an operator step.
- Reading run/pipeline state is done from the server's **MySQL** database, not
from a public API.
from a public API, when the API view is thin (the pipeline endpoint does not
expose step logs; `log_entries` in the database does).
- Note: the whole point of this CI is to take the docs build and custom-app builds
off the agent host — see `co-op/support#30` (moving `REGISTRY_BUILD_TOKEN` to CI).