docker: consider the tag when checking if a digest is up-to-date#13842
Merged
kbukum1 merged 2 commits intodependabot:mainfrom Jan 20, 2026
Merged
docker: consider the tag when checking if a digest is up-to-date#13842kbukum1 merged 2 commits intodependabot:mainfrom
kbukum1 merged 2 commits intodependabot:mainfrom
Conversation
844d7dc to
9cc12f0
Compare
9cc12f0 to
e4510f9
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in Docker digest update checking where all requirements were incorrectly compared against a single updated_digest value. The fix ensures that requirements with specific tags are compared against the digest of their own updated tag, rather than a global digest value.
Key Changes
- Modified
digest_up_to_date?to compute tag-specific expected digests for each requirement - Requirements with a tag now check their digest against the digest of the latest version of that specific tag
- Requirements without a tag continue to use the global
updated_digest(preserving existing behavior) - Added comprehensive test coverage with 6 new test contexts covering various digest scenarios
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docker/lib/dependabot/docker/update_checker.rb | Updated digest_up_to_date? method to compute expected digest per-requirement based on tag, fixing the bug where all requirements compared against a single digest |
| docker/spec/dependabot/docker/update_checker_spec.rb | Added comprehensive test suite for digest_up_to_date? covering tag+digest scenarios, multiple requirements, missing digests, and edge cases |
333edf8 to
c7b4dfb
Compare
Contributor
Author
|
@kbukum1 Unfortunately, applying Copilot's feedback and rebasing dismissed your review. Could you please review it again? |
bd94036 to
37638b7
Compare
37638b7 to
31b3d4e
Compare
31b3d4e to
77d3e72
Compare
Contributor
Author
b72f9c7 to
df332b9
Compare
When verifying whether Docker image digests are up to date, we previously compared every requirement’s `source.digest` against `updated_digest`. This was incorrect for requirements that include a `source.tag`, as the expected digest should be derived from that _updated tag._
df332b9 to
3c4598b
Compare
kbukum1
approved these changes
Jan 20, 2026
Contributor
Author
|
Thank you for reviewing and merging this @kbukum1 Could you please review the smoke test additions as a follow up? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
When verifying whether Docker image digests are up to date, we previously compared every requirement’s
source.digestagainstupdated_digest. This was incorrect for requirements that include asource.tag, as the expected digest should be derived from that updated tag.Fixes #11215
Anything you want to highlight for special attention from reviewers?
The updated tests should be an improvement over the previous attempts, and the accompanying integration tests should help us catch issues like this earlier in the future.
One key takeaway from #13794 is that our current integration test coverage can be improved to catch basic regressions like #13794. For that reason, I opened dependabot/smoke-tests#361 to improve the coverage
How will you know you've accomplished your goal?
- The reproducer documented in Dependabot fails for Docker updates with multiple tags in the same image #11215 no longer fails
Before :
Full logs
After:
Full logs
- There is no impact to existing updates such as https://github.com/github/dependabot-action
Full logs
After:
Full logs
Checklist