Compare commits

..

2 Commits

Author SHA1 Message Date
unkinben cbf45bfee1 fix: prune RPM metadata when a local file is evicted
ci/woodpecker/pr/build Pipeline was canceled
ci/woodpecker/pr/test Pipeline was canceled
ci/woodpecker/pr/pre-commit Pipeline was canceled
Evicting or deleting a local RPM removed the local_files row but left its
rpm_metadata behind, so generated repodata kept listing a package that no
longer exists. Deletes now run a provider cleanup hook symmetric to the
existing upload hook.

- add PostDeleteHook and MetadataDeleter provider interfaces, plus a
  DeleteRPMMetadata DB method
- implement AfterDelete in the RPM provider to drop the metadata row
- route both local delete paths (evictLocal and the files handler) through
  a shared deleteLocalFile helper that removes the file then runs the hook
- cover the cleanup with a dockerised test
2026-07-03 14:48:23 +10:00
unkinben 47bc8cb517 fix: show local-repo files in the cached-objects UI
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
Local repos store uploaded files in the local_files table, while
remote/proxy repos cache into the artifacts table. The shared "Cached
Objects" page always queried the artifacts table via
/api/v2/remotes/{name}/objects, so local packages (e.g. an uploaded RPM)
were servable but listed as "0 objects" in the UI.

- add ListLocalArtifacts, joining local_files with blobs and returning
  models.Artifact-shaped rows (size from the blob; counters zero and
  timestamps derived from created_at, since local files track no access)
- add LocalRoutes to the objects handler: listLocal reads local_files,
  evictLocal deletes via DeleteLocalFile; extract shared page parsing
  into pageBounds
- mount /api/v2/locals/{name}/objects (GET + DELETE) in the server
- add listLocalObjects/evictLocalObject to the UI client and route the
  Objects page to them when viewing a local repo
- cover the listing and eviction paths with a dockerised test
2026-07-03 14:44:10 +10:00

Diff Content Not Available