Stage, 2026-10-06: two scheduled scans failed on a broken clone cache (bind mount /cache/repos/<tenant>/<target>, orca-platform#56), both left behind by scans interrupted by redeploys:
Git error: could not find repository at '/cache/repos/<tenant>/<target>': the target directory exists but is empty (clone interrupted)
The scan fails and stays failed on every schedule; nothing cleans the entry. Prod cache is clean today, but prod deploys interrupt scans too (orca #279 double redeploys; #459 restarts them), so it will happen there.
Tasks
Before using a cache entry: if it is not a valid repository, or opening/fetching fails with a corruption class error (Repository, Reference, Odb), delete the entry and clone fresh once; log it at WARN with tenant/target ids
Clone into a temp dir next to the entry and rename atomically, so an interrupted clone never leaves a half entry
Remove a stale FETCH_HEAD / *.lock before fetching
Stage, 2026-10-06: two scheduled scans failed on a broken clone cache (bind mount `/cache/repos/<tenant>/<target>`, orca-platform#56), both left behind by scans interrupted by redeploys:
- `Git error: could not find repository at '/cache/repos/<tenant>/<target>'`: the target directory exists but is empty (clone interrupted)
- `Git error: corrupted loose reference file: FETCH_HEAD` (fetch interrupted)
The scan fails and stays failed on every schedule; nothing cleans the entry. Prod cache is clean today, but prod deploys interrupt scans too (orca #279 double redeploys; #459 restarts them), so it will happen there.
## Tasks
- Before using a cache entry: if it is not a valid repository, or opening/fetching fails with a corruption class error (Repository, Reference, Odb), delete the entry and clone fresh once; log it at WARN with tenant/target ids
- Clone into a temp dir next to the entry and rename atomically, so an interrupted clone never leaves a half entry
- Remove a stale `FETCH_HEAD` / `*.lock` before fetching
- Tests: empty dir, corrupt FETCH_HEAD, leftover lock → scan succeeds
sharang
added the bug label 2026-10-06 08:00:04 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Stage, 2026-10-06: two scheduled scans failed on a broken clone cache (bind mount
/cache/repos/<tenant>/<target>, orca-platform#56), both left behind by scans interrupted by redeploys:Git error: could not find repository at '/cache/repos/<tenant>/<target>': the target directory exists but is empty (clone interrupted)Git error: corrupted loose reference file: FETCH_HEAD(fetch interrupted)The scan fails and stays failed on every schedule; nothing cleans the entry. Prod cache is clean today, but prod deploys interrupt scans too (orca #279 double redeploys; #459 restarts them), so it will happen there.
Tasks
FETCH_HEAD/*.lockbefore fetching