From ea4f733de81dd27753ab9c0783cb9ff9e920dca7 Mon Sep 17 00:00:00 2001 From: forgejo-backport-action Date: Fri, 6 Mar 2026 07:50:38 +0100 Subject: [PATCH] [v14.0/forgejo] chore: add more diagnostic output to dbfs Stat error (#11528) **Backport:** https://codeberg.org/forgejo/forgejo/pulls/11525 @viceice is having problems with runner `UpdateLog` errors like this: ``` 2026-03-05T23:50:33.764718938+01:00 time="2026-03-05T22:50:33Z" level=warning msg="ReportLog error: internal: write logs: dbfs Stat \"actions_log/org/infra/99/14233.log.zst\": invalid argument" task_id=14233 2026-03-05T23:50:33.765473314+01:00 time="2026-03-05T22:50:33Z" level=warning msg="ReportLog error: internal: write logs: dbfs Stat \"actions_log/org/infra/98/14232.log.zst\": invalid argument" task_id=14232 ``` This seems to be occurring with a bit of a contradiction: - invalid argument should only occur if the file was absent in the dbfs table - the file should be created if the offset to be written to is `0` - the offset should be zero if the actions task has `log_size = 0` - `log_size != 0` would indicate that the file exists This PR adds additional details to the dbfs error, primarily to give insight into what the `offset` value is when the error occurs. Co-authored-by: Mathieu Fenniak Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11528 Reviewed-by: Michael Kriese Co-authored-by: forgejo-backport-action Co-committed-by: forgejo-backport-action --- modules/actions/log.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/actions/log.go b/modules/actions/log.go index 5df1f9bec3..c7cb270b18 100644 --- a/modules/actions/log.go +++ b/modules/actions/log.go @@ -61,7 +61,7 @@ func WriteLogs(ctx context.Context, filename string, offset int64, rows []*runne stat, err := f.Stat() if err != nil { - return nil, fmt.Errorf("dbfs Stat %q: %w", name, err) + return nil, fmt.Errorf("WriteLogs(name=%q, offset=%d, len(rows)=%d): dbfs Stat: %w", name, offset, len(rows), err) } if stat.Size() < offset { // If the size is less than offset, refuse to write, or it could result in content holes.