forgejo-aneksajo/modules/annex
Matthias Riße 99eead584a
Some checks failed
/ build-oci-image (rootful) (push) Failing after 1m39s
/ build-oci-image (rootless) (push) Failing after 1m11s
testing / backend-checks (push) Successful in 14m34s
testing / frontend-checks (push) Successful in 3m12s
testing / test-unit (push) Has been skipped
testing / test-e2e (push) Has been skipped
testing / test-mysql (push) Successful in 44m46s
testing / test-pgsql (push) Successful in 56m27s
testing / test-sqlite (push) Successful in 58m43s
testing / test-remote-cacher (redis) (push) Has been skipped
testing / test-remote-cacher (valkey) (push) Has been skipped
testing / test-remote-cacher (garnet) (push) Has been skipped
testing / test-remote-cacher (redict) (push) Has been skipped
testing / security-check (push) Successful in 5m30s
/ release (push) Has been cancelled
fix: do not propagate errors from validity check (#89)
The `checkValidity` function returns `false, err` if its `git config`
call returns an error. For renamed repositories the cached path no
longer exists, which makes `git config` return an error. When
`checkValidity` returns an error value it short-circuited the cache
lookup, instead of deleting the stale entry and retrying. This made the
`AnnexP2PHTTP` route 404.

This is fixed by ignoring the error from `checkValidity` entirely.

Fixes #88.

Reviewed-on: https://codeberg.org/forgejo-aneksajo/forgejo-aneksajo/pulls/89
Co-authored-by: Matthias Riße <m.risse@fz-juelich.de>
Co-committed-by: Matthias Riße <m.risse@fz-juelich.de>
2025-06-27 17:32:27 +02:00
..
annex.go fix: do not propagate errors from validity check (#89) 2025-06-27 17:32:27 +02:00