Rewrite runner-logs: API-based log fetching, multi-repo support

Replace broken SSH+filesystem log retrieval with Forgejo web API
endpoint. Fix CLI to use run numbers (not task IDs), add --repo
for querying any forge repo (e.g. sporks), --limit/-n for listing
size. Document runner-logs as the way to verify build success in
CLAUDE.md and container build docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erich Blume 2026-04-12 09:42:58 -07:00
commit 8d80a4a3a5
5 changed files with 170 additions and 69 deletions

View file

@ -0,0 +1 @@
Rewrite `mise run runner-logs` CLI: list runs by run number (not task ID), drill into jobs per run, fetch logs via Forgejo web API instead of SSH+filesystem. Fixes broken log retrieval caused by incorrect hex path calculation and stale data directory. Added `--repo` to query any forge repo (e.g. sporks) and `--limit`/`-n` to control listing size (0 for all).

View file

@ -68,6 +68,14 @@ mise run container-build-and-release <name> --ref <commit-sha>
Use `--dry-run` to preview without dispatching.
After dispatching, verify the workflow succeeded with `runner-logs`:
```bash
mise run runner-logs # find the new run number
mise run runner-logs <run#> # see jobs and their status
mise run runner-logs <run#> -j <N> # fetch full logs (e.g. on failure)
```
| Build file | Workflow | Runner | Registry tag |
|------------|----------|--------|--------------|
| `container.py` | `build-container.yaml` | `k8s` (indri) | `:vX.Y.Z-<sha>` |
@ -99,7 +107,7 @@ Container image tags include the git commit SHA they were built from (e.g. `v3.9
**The rule:** Production manifests must reference images built from a commit on main. After merging a PR that changed `containers/<name>/`:
1. The merge to main automatically triggers a rebuild (the `build-container.yaml` / `build-container-nix.yaml` workflows fire on pushes to `main` that touch `containers/**`)
2. Wait for the workflow to complete — check at `https://forge.eblu.me/eblume/blumeops/actions`
2. Wait for the workflow to complete — verify with `mise run runner-logs` (find the run, check status)
3. Find the new main-SHA tag:
```bash
mise run container-list <name>

View file

@ -57,7 +57,7 @@ Run `mise tasks --sort name` for the live list with descriptions.
|------|-------------|
| `branch-cleanup` | Delete merged branches (local and remote) |
| `pr-comments` | List unresolved PR comments |
| `runner-logs` | View Forgejo Actions workflow logs |
| `runner-logs` | List Forgejo Actions runs and fetch job logs (supports `--repo`, `--limit`) |
| `validate-workflows` | Validate workflow files against runner schema |
| `mikado-branch-invariant-check` | Validate Mikado Branch Invariant on `mikado/*` branches |