Docker integration test TestDockerCommandWithHelperImageConfig hardcodes a stale image digest
Summary
TestDockerCommandWithHelperImageConfig in executors/docker/docker_command_integration_test.go
hardcodes an exact image ID/digest pair for the mutable Docker Hub tag
gitlab/gitlab-runner-helper:x86_64-v16.9.1:
assert.Contains(
t,
out,
"Using docker image sha256:be0a1939d88dbce6f18b0885662080a6aabc49d7e5e51c6021f36ce327614b13 for "+
"gitlab/gitlab-runner-helper:x86_64-v16.9.1 with digest "+
"gitlab/gitlab-runner-helper@sha256:24432bb8b93507e7bc4b87327c24317029f1ea0315abf1bc7f71148f2555d681 ...",
)This started failing in CI (observed on an unrelated MR: https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/15212124101) with:
Error: "...Using docker image sha256:24432bb8b93507e7bc4b87327c24317029f1ea0315abf1bc7f71148f2555d681 for
gitlab/gitlab-runner-helper:x86_64-v16.9.1 with digest
gitlab/gitlab-runner-helper@sha256:24432bb8b93507e7bc4b87327c24317029f1ea0315abf1bc7f71148f2555d681 ..." does not contain
"Using docker image sha256:be0a1939d88dbce6f18b0885662080a6aabc49d7e5e51c6021f36ce327614b13 for
gitlab/gitlab-runner-helper:x86_64-v16.9.1 with digest
gitlab/gitlab-runner-helper@sha256:24432bb8b93507e7bc4b87327c24317029f1ea0315abf1bc7f71148f2555d681 ..."Root cause
The image ID (sha256:be0a1939...) and the manifest digest
(sha256:24432bb8...) used to differ, which is normal for a multi-arch
manifest list where the platform-specific image has its own content ID
distinct from the manifest list's digest. The tag
gitlab/gitlab-runner-helper:x86_64-v16.9.1 on Docker Hub has since been
republished such that the manifest digest and image ID are now the same
value (sha256:24432bb8...). This is an external, upstream change to a
mutable tag — not something under this repo's control — and it makes the
old hardcoded expectation permanently stale rather than intermittently
flaky.
Impact
Any pipeline that runs Docker executor integration tests touching
executors/docker/* now fails this test deterministically, on any MR,
regardless of the MR's own changes.
Suggested fix
Stop asserting an exact hardcoded digest pair. Assert on the structural pattern instead (tag name honored, well-formed sha256 image ID/digest), e.g. via a regex match, so the test remains resilient to future upstream republishes of this mutable tag.