quay.io tag list rework #36292
mjnagel
started this conversation in
Suggest an Idea
Replies: 1 comment
-
I pushed up a commit on my fork that I think would implement the proposal mentioned: 95134f6 I can get this opened as a PR if there is interest - it should behave the same for most users since public images will still hit the
The main thing I'm not sure on with is some of the nuances around |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Tell us more.
This is related to some previous discussions:
In digging into these previous discussions it seems like:
v2
api with Quay that made it inefficient to perform tag lookupsapi/v1
from Quay is being used instead in Renovate for Quay images as it can return the latest tags more efficientlyv2
endpointsAs a consumer of some private images from quay.io, I have a robot account that can be used to pull those private images. Unfortunately, I do not have an OAuth token for the
api/v1
endpoints, meaning that I'm currently unable to use Renovate to monitor/update these images. After digging into quay, a few other tools, and renovate code I think there may be a few alternative paths to make the quay lookup/auth process easier.If trying to use the v2 API only the first step is to use basic auth to acquire a token from the
/v2/auth
endpoint:This API request returns JSON with a token (I think at this point this is similar to other registries). That token can then be used in tag list calls:
This is where this approach can be problematic. As noted in previous discussions the results returned from this list (1) start with the oldest tags and (2) are limited to 100 results. Previously it seems like results were limited to 50 results so this is a slight improvement, but still inefficient. Each request returns a
link
header as well that can be followed to get the "next page" of results. As noted in previous discussions this could be 100+ pages of results for some images with a large amount of tags.I do think however that it could be usable in some cases, IF using the
last
query parameter in the request. As an example of what this might look like:In theory renovate could use the
currentVersion
for this query parameter, limiting the results to only tags newer than the tag currently being used. To note two potential edge cases here:What I would propose to rework the quay.io auth logic (and be willing to contribute changes towards this):
api/v1
first/by default (this would continue to be used for all public images in other words)api/v1
returns 401 errors, fallback tov2
(this would likely be the case only for private images)v2
api with quay, append thelast
query param with the current version to limit the number of pages Renovate has to queryI wanted to open this as a discussion to start and would be willing to contribute changes if we can find an acceptable path forward. Also happy to provide additional logs/requests that might help with identifying a different path forward.
Beta Was this translation helpful? Give feedback.
All reactions