fj run view --log/--log-failed reports "no logs" for every run even when logs exist #92
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What happened
Against
rasterstate/fluxon rasterhub.com, every form of log retrieval fails for every run, regardless of run outcome:This reproduces for successful runs and failed runs alike, including runs whose logs are fully visible in the web UI and whose step logs exist in the Forgejo DB (
action_task_step.log_lengthis nonzero for the same tasks).Why it matters
The error message reads as "the job died before producing logs", which sent a real CI triage down a long detour (chasing runner provisioning, autoscaler limits, and log shipping) when the actual failure was an ordinary step failure whose logs existed the whole time. Ground truth had to come from sqlite on the server:
Expected
fj run view <n> --logprints the step logs when they exist; "no logs" is reserved for runs that genuinely produced none.Environment
pull_requestandworkflow_dispatchattemptfield in some API responses, so an attempt-keyed log lookup may be missing its key rather than the logs being absent.Duplicate of rasterstate/fj#91, which carries the full root-cause analysis.
Same defect, second repro:
fj run view --log/--log-failedreturns "no logs" for every run on a private repo regardless of outcome. rasterstate/fj#91 traces it tofjPOSTing the Forgejo web log route (/{owner}/{repo}/actions/runs/{n}/jobs/{j}/attempt/{a}) with API-token auth, which a private repo answers with a 404 because that route wants session-cookie + CSRF, not a token.log_route_errorinsrc/api/workflow_view.rsthen maps every 404 to "no logs for that run/job/attempt", masking the auth failure as a missing run.The two useful details from this report are folded into rasterstate/fj#91:
action_task_step.log_lengthserver-side whilefjreports none, andattemptfield in some API responses, which is consistent with the attempt-keyed lookup failing.Closing as a duplicate. Tracking the fix and the private-repo test in rasterstate/fj#91; the deeper "actually retrieve private-repo logs" work is split out separately and linked from there.