Open joniw opened 1 year ago
I don't think this is a bug. If you delete something from the web UI you are outside the specific package registry spec and you need to know what you are doing. For this reason most package managers simply disallow deleting of packages. Gitlab for example allows to delete individual files which is even more harmful if you don't take care. The deletion page already warns you about your action.
I agree that this is not necessarily a bug.
On the other side the ImageList references manifests which contain the digests of the packages. Should this not count as a reference?
The deletion of a package version via the UI is a dumb operation. (Currently) the package type and possible implications are not checked. We can leave this issue open but for me, this feature/enhancement has no priority beause the deletion of a package is "unsupported". Lots of package registries simply disallow deletions because other entities may depend on that package and so on.
Hello,
i hoped for a quick fix to reference the ids of the ImageList. If this is not possible, it is OK for me to leave this open as an low priority feature request.
It could even be closed if this behaviour is intended.
With regards Joniw
Description
Hello,
when a package version is deleted, which is referenced by an OCI Image Index (or ManifestList for docker), the image can no longer be fetched by Image Index, if the deleted tag is needed or used.
Create an Image Index:
Now delete the container image with version "latest-amd64" via the web interface.
Try to pull the image on an amd64 architecture:
Before running the package prune, the files are still present:
After the prune they are gone:
With the docker-registry container the images can still be pulled via the ManifestList, but not via the deleted tag.
In my opinion when deleting the tag, the Image Index should still work. There should at least be a warning if an Image Index references the tag.
With regards Joniw
Gitea Version
1.17.3
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
Linux
How are you running Gitea?
Test instance in Kubernetes
Database
SQLite