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

Tag listing API Fails: 404 error unknown repository, although the repo is being listed in the catalog API. #4324

Open
arshh-d opened this issue Apr 15, 2024 · 1 comment

Comments

@arshh-d
Copy link

arshh-d commented Apr 15, 2024

Description

After deleting the last tag, if we try to list the tags within the same repo, 404 error is returned with message repository is unknown. even though the repo is being listed in the catalog api response

Reproduce

  1. delete the last tag within the repo
  2. list tags of the repo

response:

{
    "errors": [
        {
            "code": "NAME_UNKNOWN",
            "message": "repository name not known to registry",
            "detail": {
                "name": "<name>/<tag>"
            }
        }
    ]
}

Expected behavior

if there are no tags present for the given repo, we may consider returning empty list instead of 404 for repository.

registry version

version - v3.0.0

Additional Info

code reference
if the _manifests/tags/ directory is empty PathNotFoundError is returned.
Instead of returning ErrRepositoryUnknown for the above case we can skip this check to return empty tag list.

@milosgajdos
Copy link
Member

Yeah making this change could be....complicated as we might break other people's tools since that's the current behaviour and it's compliant with the spec: https://github.com/opencontainers/distribution-spec/blob/main/spec.md#listing-tags

The list of tags MAY be empty if there are no tags on the repository

The spec itself is just a pile of sadness so I empathise with you.

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