feat(ci): read Actions step logs off the Forgejo node when the API cannot #84
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
gmackie/ForgeGraph!84
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/ci-logs-node-fallback"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Forgejo exposes no job-log REST endpoint, so
fg ci logshas never returned real step logs. This adds a server-side fallback: resolve log_filename from the forgejo DB by job id, read the (zstd) files off hetzner-fg via hub dispatch. 4 new route tests.🤖 Generated with Claude Code
This Forgejo instance has no job-log REST endpoint (confirmed repeatedly — every CI debugging session fell back to manual zstd-over-node-exec). When GET /actions/jobs/{id}/logs fails, the runs/[id]/logs route now resolves each job's log_filename from the forgejo DB and reads the files (zstd or plain) off the Forgejo node's disk via hub dispatch, capped at 500KB. Node name configurable via FORGEJO_LOG_NODE (default hetzner-fg). Job ids are integer-validated before SQL interpolation; every failure degrades to the existing run-URL message. fg ci logs <run-id> now returns real step logs with no CLI changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>