Forgejo Actions job logs are unreadable through the API #786

Closed
opened 2026-08-11 23:35:13 +00:00 by coilyco-ops · 1 comment
Member

Both documented endpoints 404 on the deployed Forgejo build:

GET /api/v1/repos/{owner}/{repo}/actions/runs/{run_id}/jobs   -> 404
GET /api/v1/repos/{owner}/{repo}/actions/jobs/{job_id}/logs   -> 404

The web UI's POST /{owner}/{repo}/actions/runs/{i}/jobs/{j} needs a session
cookie, so an agent or script cannot read why a job failed.

Why it matters

A CI failure class cannot be diagnosed from evidence, only guessed at from
symptoms. This was the blocking gap while investigating the pre-commit network
failures: the run list gives pass or fail and nothing else, so the failure rate
was measurable but the cause was not.

Options

  • Upgrade Forgejo to a version serving the jobs and logs API.
  • Ship runner logs to SigNoz so failures are queryable there.
Both documented endpoints 404 on the deployed Forgejo build: ``` GET /api/v1/repos/{owner}/{repo}/actions/runs/{run_id}/jobs -> 404 GET /api/v1/repos/{owner}/{repo}/actions/jobs/{job_id}/logs -> 404 ``` The web UI's `POST /{owner}/{repo}/actions/runs/{i}/jobs/{j}` needs a session cookie, so an agent or script cannot read why a job failed. ## Why it matters A CI failure class cannot be diagnosed from evidence, only guessed at from symptoms. This was the blocking gap while investigating the pre-commit network failures: the run list gives pass or fail and nothing else, so the failure rate was measurable but the cause was not. ## Options * Upgrade Forgejo to a version serving the jobs and logs API. * Ship runner logs to SigNoz so failures are queryable there.
Author
Member

Resolved by the Forgejo 16.0.2 upgrade, applied 2026-08-12 and recorded on
issue 620.

Both endpoints that 15 had no route for now answer against the live instance:

GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs
  -> 27514 test success, 27515 publish-echo-image success

GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs
  -> HTTP 200, 23935 bytes of runner log

The SigNoz log-shipping alternative floated in the original description is not
needed. The endpoints existed upstream, this instance was two minor versions
behind them.

One client-side gap remains before this is usable from an agent without curl:
aosguard ops forgejo action-job logs fails with invalid character '-' after top-level value, because it JSON-parses a plaintext body. The guardfile already
declares the verb and annotates it "(Forgejo 16)", so this is response handling
rather than a missing grant.

Resolved by the Forgejo 16.0.2 upgrade, applied 2026-08-12 and recorded on issue 620. Both endpoints that 15 had no route for now answer against the live instance: ``` GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs -> 27514 test success, 27515 publish-echo-image success GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs -> HTTP 200, 23935 bytes of runner log ``` The SigNoz log-shipping alternative floated in the original description is not needed. The endpoints existed upstream, this instance was two minor versions behind them. One client-side gap remains before this is usable from an agent without curl: `aosguard ops forgejo action-job logs` fails with `invalid character '-' after top-level value`, because it JSON-parses a plaintext body. The guardfile already declares the verb and annotates it "(Forgejo 16)", so this is response handling rather than a missing grant.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/infrastructure#786
No description provided.