forgejo role: forgejo_work_path default is stale after the rootless migration (ADR 0031) #207
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra#207
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Found while building the ADR 0031 phase-2 rehearsal tooling (#91).
Problem
roles/forgejo/defaults/main.ymlstill defaultsforgejo_work_pathto/data/gitea(the rootful image layout). On the-rootlessimage the work dir is/var/lib/gitea—app.ini.j2already hardcodesWORK_PATH = /var/lib/gitea, and there is no group_vars override.As a result, the role's code-search index reclaim task (
roles/forgejo/tasks/main.yml, therm -rf {{ forgejo_work_path }}/indexersrun that fires when the repo indexer is disabled) targets/data/gitea/indexers, which does not exist in the rootless container. The reclaim becomes a silent no-op — it can no longer delete a leftover index directory under the real work path.Impact
Low right now: code search (zoekt) is disabled, so there is no index to reclaim. But once the rootless cutover lands (ADR 0031) this default is wrong, and if code search is re-enabled/disabled later the reclaim would not free the index bytes.
Fix
Key
forgejo_work_pathoff the rootless layout (/var/lib/gitea), or derive it from the same source app.ini'sWORK_PATHuses, so the reclaim path is correct post-cutover.supernaut refererade till detta ärende2026-07-22 13:51:33 +00:00
Fixed on
feat/91-git-ssh-rootless(PR #118, commit db5e647):forgejo_work_pathdefault →/var/lib/gitea, matching the rootlessWORK_PATHin app.ini, so the index-reclaim targets/var/lib/gitea/indexerscorrectly.Kept scoped to the rootless branch rather than a separate main PR: on
main(rootful) the current/data/giteadefault is still correct, so there's nothing to change there. TheCloses #207in the commit auto-closes this once #118 merges at the ADR 0031 cutover.