Forgejo log backpressure drops actionable failure diagnostics and loses step attribution #3
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?
A real Forgejo/Firecracker job failed its dependency advisory check, but the useful error detail was missing from the delivered logs and the user saw failed steps with no explanation.
Observed with Rith
0684459ea7, Forgejo 15.0.9, NixOS Firecracker guests, and three concurrent jobs (4 vCPUs / 8192 MiB per guest).Reproduction evidence:
nix develop path:. -c just denyfailed with exit status 1.advisories FAILED, bans ok, licenses ok, sources ok, followed byerror: recipe deny failed on line 38 with exit code 1.Rith truncated 1848 log records while delivery was backlogged.Rith: output was truncated; remaining logs are combined under the first step.error[...]advisory heading or a RUSTSEC ID. A yanked-crate warning survives, but that alone does not establish the reason advisories failed.Relevant code in src/ingress.rs drops log events when try_send returns Full and sets log_positions_lost; finalization then combines the remaining output under the first step. The completion log tail is only a bounded suffix, which is insufficient when Cargo Deny prints a long dependency tree after its actionable advisory header.
Please retain a complete bounded-on-disk diagnostic artifact (or equivalent durable spool) and preserve step attribution/completion diagnostics under normal verbose build output, without unbounded RAM or blocking guest execution indefinitely. At minimum surface the command, exit code, truncation count, and a clear link to recoverable logs on the failed step. Missing bytes must not be described as merely combined elsewhere.
No patched runtime has been tested. The underlying Cargo Deny failure is a project dependency issue; this report concerns loss of the information needed to diagnose it.
Fixed on main in 8486d7e9cce2.
Replaced the lossy worker queue with a bounded disk spool and retained redacted archives, downloadable through the controller at
GET /jobs/forgejo-TASK_ID/logs. Ordinary delivery backlog now preserves records and step attribution. When remote delivery loses records, failed steps expose recovery diagnostics with the command, exit code, loss counts, and archive location. Guest budget warnings now explicitly identify omitted output rather than claiming it is combined elsewhere.Validation passed: all 251 Rust tests, strict Clippy, Rust/Nix formatting, and Nix flake evaluation. Regression coverage includes verbose backlog, rejected rows, archive recovery/redaction/retention, and spool creation failures. The reported live Forgejo/Firecracker workflow has not been rerun with this patch.