Skip to content

Make Renovate update Dockerfile base image digests - #2761

Merged
rajathagasthya merged 1 commit into
NVIDIA:mainfrom
rajathagasthya:fix/renovate-dockerfile-digest
Aug 21, 2026
Merged

Make Renovate update Dockerfile base image digests#2761
rajathagasthya merged 1 commit into
NVIDIA:mainfrom
rajathagasthya:fix/renovate-dockerfile-digest

Conversation

@rajathagasthya

@rajathagasthya rajathagasthya commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description

Renovate's custom manager for docker/Dockerfile matched only the golang version and resolved it via the golang-version datasource, which has no notion of image digests — PRs like #2759 bumped the tag but left the pinned @sha256 digest unchanged. Since the digest takes precedence over the tag at pull time, docker pull silently uses the old image. The other digest-pinned base images (ubi9, debian, distroless/cc) were not managed at all.

Replace the golang-specific manager with a generic one that captures the image name, tag, and digest from every pinned FROM line and resolves updates via the docker datasource, so tag and digest are updated together. Non-version tags (ubi9:latest, debian:trixie-slim) get digest-only updates. The Go toolchain group rule is extended so golang image bumps still land in the same PR as the versions.mk GOLANG_VERSION bump.

Checklist

  • No secrets, sensitive information, or unrelated changes
  • Lint checks passing (make lint)
  • Generated assets in-sync (make validate-generated-assets)
  • Go mod artifacts in-sync (make validate-modules)
  • Test cases are added for new code paths

Testing

Verified the new matchStrings regex captures image name, tag, and digest for all five pinned FROM lines across docker/Dockerfile and docker/Dockerfile.devel.

The custom regex manager for docker/Dockerfile only matched the golang
version and resolved it via the golang-version datasource, which has no
notion of image digests. Renovate PRs bumped the tag but left the pinned
@sha256 digest unchanged (e.g. NVIDIA#2759); since the digest takes precedence
over the tag at pull time, builds silently kept using the old image. The
other digest-pinned base images (ubi9, debian, distroless/cc) were not
managed at all.

Replace the golang-specific manager with a generic one that captures the
image name, tag, and digest from every pinned FROM line and resolves
updates via the docker datasource, so tag and digest are updated
together. Images with non-version tags (ubi9:latest, debian:trixie-slim)
get digest-only updates. Extend the Go toolchain group rule so golang
image bumps still land in the same PR as the versions.mk GOLANG_VERSION
bump.

Signed-off-by: Rajath Agasthya <ragasthya@nvidia.com>
Comment thread .github/renovate.json
@rajathagasthya rajathagasthya self-assigned this Aug 21, 2026
@rajathagasthya
rajathagasthya merged commit a22dbf6 into NVIDIA:main Aug 21, 2026
21 checks passed
@rajathagasthya
rajathagasthya deleted the fix/renovate-dockerfile-digest branch August 21, 2026 17:16
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

Successfully merging this pull request may close these issues.

3 participants