1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-10-15 19:42:06 +00:00
forgejo-runner/act/artifactcache
Earl Warren 37f634fd31
fix: cache: call fatal() on errors that are not recoverable
- responseFatalJSON(w, r, err) replaces responseJSON(w, r, 500, err)
  and calls fatal() when the following fail because they are
  not recoverable. There may be other non-recoverable errors but
  it is difficult to be 100% sure they cannot be engineered by the
  caller of the API for DoS purposes.
  - openDB
  - findCache
  - cache.Repo != repo
- wrap errors in
  - openDB() - it was missing
  - readCache() - it was missing
  - useCache() - it was missing
  - findCache() - some had identical messages
- in gc
  - replace logger.Warnf with h.fatal
  - differentiate errors that have identical messages
  - call fatal if openDB fails instead of returning
2025-09-05 17:29:04 +02:00
..
testdata/example Support cache (#1770) 2023-04-28 15:57:40 +00:00
doc.go Support cache (#1770) 2023-04-28 15:57:40 +00:00
handler.go fix: cache: call fatal() on errors that are not recoverable 2025-09-05 17:29:04 +02:00
handler_test.go fix: cache: call fatal() on errors that are not recoverable 2025-09-05 17:29:04 +02:00
mac.go refactor: remove duplicate computeMac function (#936) 2025-09-05 06:01:49 +00:00
mac_test.go refactor: remove duplicate computeMac function (#936) 2025-09-05 06:01:49 +00:00
model.go fix: PRs cache artifacts separate from other runs 2025-09-01 13:45:43 +02:00
storage.go chore: use the same .golangci.yml as the runner & gofumpt over gofmt (#206) 2025-07-28 12:26:41 +00:00