forge(docs): locate the LFS store from the host, not at a container path (#1507) #1784

Merged
jaylouisw merged 1 commit from fix/1117-0335 into main 2026-11-17 04:11:29 +00:00
Owner

Refs #1507 - repo side only. This issue stays open: the storage decision itself still needs a shell on the host.

What was wrong

The last step of the disk-full page printed:

du -sh /data/gitea/lfs /data/gitea/data/lfs 2>/dev/null

and called it "on the host". /data only exists inside the container - the same page records the bind
/mnt/user/appdata/forgejo/data -> /data in "Diagnosing which path the database is actually on". On a
host shell the command matches nothing, exits 0, and 2>/dev/null hides the miss. A reader follows the
page and sees no output, which reads exactly like "there is no LFS here" - the same empty-result-read-as-
measurement error the section above it was written to correct.

What changed

  • the probe runs at the mapped host paths and prints absent: <path> rather than nothing;
  • two follow-ups that decide what absent means: docker inspect forgejo for the bind, and the [lfs]
    section of app.ini for PATH and STORAGE_TYPE;
  • STORAGE_TYPE other than local is called out explicitly: the GiBs are then not on this volume at all,
    so df -h here can never see them and deleting LFS objects is not the repair.

Tests

test/forge-space-accounting.test.js: 20 assertions, 5 of them new and all 5 red on the previous page.
Full suite: 302 suites, 10,583 assertions, 0 failed. node scripts/syntax-check.js: 373 files, all OK.
The printed commands were run in this session (the loop prints absent: for missing paths; the sed
range exits 0 on a file with no [lfs] block).

Refs #1507 - repo side only. This issue stays open: the storage decision itself still needs a shell on the host. ## What was wrong The last step of the disk-full page printed: ```bash du -sh /data/gitea/lfs /data/gitea/data/lfs 2>/dev/null ``` and called it "on the host". `/data` only exists inside the container - the same page records the bind `/mnt/user/appdata/forgejo/data -> /data` in "Diagnosing which path the database is actually on". On a host shell the command matches nothing, exits 0, and `2>/dev/null` hides the miss. A reader follows the page and sees no output, which reads exactly like "there is no LFS here" - the same empty-result-read-as- measurement error the section above it was written to correct. ## What changed - the probe runs at the mapped host paths and prints `absent: <path>` rather than nothing; - two follow-ups that decide what `absent` means: `docker inspect forgejo` for the bind, and the `[lfs]` section of `app.ini` for `PATH` and `STORAGE_TYPE`; - `STORAGE_TYPE` other than `local` is called out explicitly: the GiBs are then not on this volume at all, so `df -h` here can never see them and deleting LFS objects is not the repair. ## Tests `test/forge-space-accounting.test.js`: 20 assertions, 5 of them new and all 5 red on the previous page. Full suite: 302 suites, 10,583 assertions, 0 failed. `node scripts/syntax-check.js`: 373 files, all OK. The printed commands were run in this session (the loop prints `absent:` for missing paths; the `sed` range exits 0 on a file with no `[lfs]` block).
forge(docs): locate the LFS store from the host, not at a container path (#1507)
Some checks failed
CI / Arm auto-merge (pull_request) Blocked by required conditions
CI / Classify the change (pull_request) Successful in 8s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 21s
CI / Test (Node 20) (pull_request) Successful in 51s
CI / Test (Node 22) (pull_request) Successful in 59s
CI / Test (Node 18) (pull_request) Successful in 1m3s
CI / Docker build (pull_request) Successful in 20s
CI / Server smoke test (pull_request) Failing after 14m32s
a2292e6d61
The page's last step sends the reader to run `du -sh /data/gitea/lfs` on the host, but
`/data` exists only inside the container - the same page records the bind
`/mnt/user/appdata/forgejo/data -> /data` thirty lines later. On a host shell that
command matches nothing and, with `2>/dev/null`, exits 0 printing nothing, which is
indistinguishable from "there is no LFS here" - the exact confusion the section above
it was written to end.

Now the LFS probe runs at the mapped host paths and prints `absent: <path>` instead of
silence, then asks the two questions that decide the answer: what the bind maps
(`docker inspect` mounts), and what `[lfs]` PATH/STORAGE_TYPE in app.ini says. A
non-local STORAGE_TYPE is called out as bytes that are not on this volume at all.

Five assertions in test/forge-space-accounting.test.js lock it; all five failed on the
previous page.
jaylouisw force-pushed fix/1117-0335 from a2292e6d61
Some checks failed
CI / Arm auto-merge (pull_request) Blocked by required conditions
CI / Classify the change (pull_request) Successful in 8s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 21s
CI / Test (Node 20) (pull_request) Successful in 51s
CI / Test (Node 22) (pull_request) Successful in 59s
CI / Test (Node 18) (pull_request) Successful in 1m3s
CI / Docker build (pull_request) Successful in 20s
CI / Server smoke test (pull_request) Failing after 14m32s
to ea18284a53
Some checks failed
CI / Classify the change (pull_request) Successful in 8s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 7s
CI / Server smoke test (pull_request) Successful in 11s
CI / Test (Node 22) (pull_request) Successful in 1m6s
CI / Docker build (pull_request) Successful in 25s
CI / Test (Node 18) (pull_request) Successful in 1m9s
CI / Test (Node 20) (pull_request) Failing after 58s
CI / Arm auto-merge (pull_request) Successful in 3s
2026-11-17 03:58:45 +00:00
Compare
jaylouisw force-pushed fix/1117-0335 from ea18284a53
Some checks failed
CI / Classify the change (pull_request) Successful in 8s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 7s
CI / Server smoke test (pull_request) Successful in 11s
CI / Test (Node 22) (pull_request) Successful in 1m6s
CI / Docker build (pull_request) Successful in 25s
CI / Test (Node 18) (pull_request) Successful in 1m9s
CI / Test (Node 20) (pull_request) Failing after 58s
CI / Arm auto-merge (pull_request) Successful in 3s
to 81bd935979
All checks were successful
CI / Classify the change (pull_request) Successful in 10s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 9s
CI / Server smoke test (pull_request) Successful in 9s
CI / Test (Node 18) (pull_request) Successful in 58s
CI / Docker build (pull_request) Successful in 25s
CI / Test (Node 20) (pull_request) Successful in 50s
CI / Test (Node 22) (pull_request) Successful in 50s
CI / Arm auto-merge (pull_request) Successful in 13s
2026-11-17 04:07:55 +00:00
Compare
Sign in to join this conversation.
No reviewers
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
jaylouisw/packetforge!1784
No description provided.