Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DELETE repo and tag endpoints #2747

Open
manishtomar opened this issue Oct 30, 2018 · 1 comment
Open

DELETE repo and tag endpoints #2747

manishtomar opened this issue Oct 30, 2018 · 1 comment

Comments

@manishtomar
Copy link
Contributor

manishtomar commented Oct 30, 2018

Currently the only way to delete repository from registry is by deleting it's directory manually from registry-v2/docker/registry/v2/repositories directory in storage. Until then the repo will be returned by catalog API and cause confusion when people delete manifests and tags from the repo. See #2434. There should be API to delete repo DELETE /v2/<repo> and delete tag DELETE /v2/<repo>/tags/<tagname>. These API implementations will effectively remove the repo directory from registry-v2/docker/registry/v2/repositories and tag directory from registry-v2/docker/registry/v2/repositories/<repo>/tags correspondingly.

@madushajg
Copy link

What are the consequences we may face when deleting the repository from its directory?

wmfgerrit pushed a commit to wikimedia/operations-docker-images-docker-report that referenced this issue Jan 18, 2022
Whenever we've removed all tags for a repository, the repository will still
show up in the catalog because of an open bug

distribution/distribution#2747

and the tags/list endpoint would return 404. So handle that situation without
throwing an exception - just return an empty tags list.

Bug: T242604
Change-Id: Ie3d8f20fd74224f2d926133c17c4c7d396358028
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants