Docker Hub newDigest from tag API bypasses architecture-specific digest resolution #41321
Unanswered
dschmidt
asked this question in
Request Help
Replies: 0 comments
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.
-
How are you running Renovate?
Self-hosted Renovate CLI
Which platform are you running Renovate on?
GitLab (.com or self-hosted)
Which version of Renovate are you using?
43.25.10
Please tell us more about your question or problem
When processing Docker Hub images, Renovate uses the
tag_last_pushedAPI which returns anewDigestfield containing the manifest list digest (multi-platform index). This digest is assigned torelease.newDigestindatasource/docker/index.js:565, and the lookup code uses it directly via??=, bypassinggetDigest()and its architecture-specific resolution.When an architecture-specific digest is already pinned (e.g.
linux/amd64), Renovate's update broadens it to the manifest list digest, effectively changing the scope from a single platform to a multi-platform index.Minimal reproduction
Run Renovate with
--dry-run=lookupand--platform localagainst a repo containing this Dockerfile.Result: Renovate proposes updating to
sha256:035b9ab53cfa147d7202b61f5f7782b939ae815b7d6bc81c96b7b42ff1fca950(18-alpine) andsha256:97ff59a4e30e08d1c11bdcd9455e7832368c0572b576c9092cde2df4ae5552a3(16-alpine digest update). Both are manifest list digests (16 platforms each).Expected: Renovate should propose the
linux/amd64-specific digest, e.g.sha256:9560e8419a4918b86a54703cebcb0c89c59b741ee2461761352336df09bacb87for 18-alpine — a single-platform manifest. This is whatgetDigest()returns when it's actually called.Root cause
In
datasource/docker/index.js, the Docker Hub tag API response populatesrelease.newDigest:Later in the lookup flow, this pre-populated
newDigestis used via??=, sogetDigest()(which resolves the architecture-specific digest) is never called.Our workaround
We remove the
release.newDigest = newDigestassignment via an ESM loader hook, sogetDigest()is always called and resolves the correct architecture-specific digest.Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions