forge(docs): the host-side du runs at the bind source, not at /data (#1507) #1787
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1787
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/1117-0405"
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?
Refs #1507 - repo side only; the storage decision still needs a shell on the host.
What was wrong
The cross-check in "Which repository owns the space" was introduced as "From the host, the same question from the other end" and printed:
/datais the container's mount point. On a host shell that path matches nothing,duprints its miss (and with any2>/dev/nullhabit, prints nothing at all), and the reader concludes no repository owns the space. The same page records the bind.../forgejo/data -> /datain "Diagnosing which path the database is actually on", so the page contradicted itself 30 lines later. This is the same defect #1784 fixes for the LFS probe at the end of the section, left behind one paragraph earlier - and the test asserted the container path as the host command, so the suite certified the bug.What changed
/data;absent: <path>, not left as silence;docker exec forgejo du -s /data/git/repositories/...form is kept, explicitly inside the container, which is where it is correct;Tests
test/forge-space-accounting.test.js: 17 assertions, 0 failed; the single assertion that certified the container path as a host command is replaced by three, all three red on the previous page (checked againstorigin/main's copy of the doc: host-bind RED, /data-outside-container RED, absent-echo RED).Full suite: 303 suites, 10,595 assertions, 0 failed (
node scripts/run-tests.js --concurrency=8, 216 s).node scripts/syntax-check.js: 374 files, all OK.audit-port-types,check-control-bytes,check-canonical-urls(3,012 files) all clean.The printed loop was run in this session on a host with neither mount: it prints the two
absent:lines and exits 0, which is what the page says it does.The cross-check under "Which repository owns the space" was labelled "From the host" and printed du -sh /data/git/repositories/*/*.git | sort -h | tail -5 `/data` is the container's mount point; on the host that path matches nothing, `du` prints its miss, and the same page records the bind `.../forgejo/data -> /data` in a later section. A reader on the host gets no output and reads it as "no repository owns the space" - the empty-result-as- measurement mistake this section exists to correct, and the same defect #1784 fixes one paragraph further down for the LFS probe. The cross-check now loops the two bind sources (pool path and FUSE view), prints `absent: <path>` for a candidate that is not there, and keeps the `docker exec ... /data/git/repositories` form explicitly inside the container, which is where it is correct. test/forge-space-accounting.test.js: the assertion that certified the container path as a host command is replaced by three - the host du runs at a /mnt bind source, a /data/git path appears only inside `docker exec` (or a comment), and a missing candidate is echoed. 17 assertions, 3 red on the previous page.5e53debc65f9c897fa3b