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

crane: requesting 1000 tags from quay.io reports that max of 100 tags is exceeded #1963

Closed
khrisrichardson opened this issue Jun 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@khrisrichardson
Copy link

Describe the bug

quay.io just started reporting the following error when using crane

TOO_MANY_TAGS_REQUESTED: Too many tags requested; requested limit 1000 is too high, max is 100

To Reproduce

Expected behavior

The following shouldn't fail, but instead produces the above error.

crane ls quay.io/prometheus-operator/prometheus-config-reloader
@khrisrichardson khrisrichardson added the bug Something isn't working label Jun 21, 2024
@jamesbarnett91
Copy link

jamesbarnett91 commented Jun 21, 2024

We are also hitting this issue. Seems like it's linked to a recent change to Quay which must have just been rolled out to quay.io: quay/quay#2884

There is a small wrinkle though: as per the OCI spec, a client is still allowed to request an arbitrarily high number of tags to be returned in a single API call, which we so far silently ignored and returned the configured maximum. Now we return an HTTP 413 response, which technically is against the spec but needed in order to protect the registry against rogue clients and also return a clear error signal instead of less tags than the client asked for

So their limit always was 100 but was being silently ignored before, whereas now they throw an error.

Seems like there is already logic to set the current 1000 limit for non-Google registries, maybe this now needs a similar check for quay.io to set to n=100?

// ECR returns an error if n > 1000:
// https://github.com/google/go-containerregistry/issues/681
if !isGoogle(repo.RegistryStr()) {
uri.RawQuery = "n=1000"
}

Or ideally a way to specify the page size via the cli

@khrisrichardson
Copy link
Author

It looks like quay fixed this on their end: fluxcd/image-reflector-controller#585 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants