Feature Request: Make Docker tag pagination limit (n) configurable via hostRules
#38802
benjaminknauer
started this conversation in
Suggest an Idea
Replies: 1 comment
-
|
The project https://github.com/distribution/distribution restricts to 1000 tags per page in their latest release: https://github.com/distribution/distribution/pull/4353/changes#diff-8f0bdcebc5d79e48e258ddf6df480ddc7bb76934779b343c7ebe2a3d66eebe62R227 |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Description
When using Renovate with certain Docker registry implementations that act as a proxy (specifically Sonatype Nexus Repository OSS), a problem occurs that severely impacts Renovate's ability to update dependencies. This behavior has been confirmed in community discussions and is tracked in sonatype/nexus-public#209.
The problem can be summarized as follows:
n=10000(e.g.,GET /v2/renovate/renovate/tags/list?n=10000).nparameter and limit the response to 10,000 tags, but they do not correctly implement the Docker Registry v2 API's pagination. They fail to send the mandatoryLinkHTTP header in the response when more than 10,000 tags exist.Linkheader signals that the tag list is complete. Renovate therefore incorrectly assumes it has received the entire list.renovate/renovateitself), the truncated list contains only the oldest 10,000 tags. This results in Renovate being unable to find newer versions, causing it to fail on self-updates or updates for other heavily-tagged images.While the primary solution is to upgrade the faulty registry, this is not always immediately possible for end-users. A configuration option in Renovate would provide a robust workaround and increase resilience against various, non-fully-compliant registry implementations.
Proposed Solution
I propose introducing a new configuration option within
hostRulesto allow overriding the pagination limit (thenparameter) for the Docker datasource on a per-host basis.A potential name for this option could be
dockerTagPageLimit.This option should allow for:
n: A user could increase the value if their registry allows it, to fetch more tags per request.0or-1), Renovate could be instructed to omit thenparameter entirely. As mentioned in related discussions (e.g., for Artifactory), this causes some registries to return the full, unpaginated list.Example configurations in
renovate.json:To increase the page size for a specific host:
{ "hostRules": [ { "matchHost": "https://docker-group.mycomp.com/v2/", "dockerTagPageLimit": 9999999 } ] }To disable pagination for a specific host (by sending
n=-1or omitting the parameter):{ "hostRules": [ { "matchHost": "https://docker-group.mycomp.com/v2/", "dockerTagPageLimit": -1 } ] }This configuration would instruct Renovate to explicitly set or omit the
nparameter when making requests todocker-group.mycomp.com, bypassing the registry's faulty pagination logic and hopefully returning the complete tag list.Additional Context
This issue is not limited to Sonatype Nexus. Similar pagination bugs have been reported for other products like Artifactory, as discussed in detail in renovatebot/renovate#15080. A generic solution in hostRules would therefore be beneficial for the entire community.
Renovate already implements host-specific logic for the pagination limit of AWS ECR (n=1000), which sets a precedent for such host-specific configuration. Extending this logic to be user-configurable seems like a logical next step.
Related Issues
#37672 A Renovate discussion where a user details the same problem of receiving only the oldest 10,000 tags when using a Nexus proxy, confirming the issue is not isolated.
Beta Was this translation helpful? Give feedback.
All reactions