Skip to content

docker: consider the tag when checking if a digest is up-to-date#13794

Merged
kbukum1 merged 1 commit intodependabot:mainfrom
yeikel:fix/consider-tag
Dec 18, 2025
Merged

docker: consider the tag when checking if a digest is up-to-date#13794
kbukum1 merged 1 commit intodependabot:mainfrom
yeikel:fix/consider-tag

Conversation

@yeikel
Copy link
Copy Markdown
Contributor

@yeikel yeikel commented Dec 16, 2025

What are you trying to accomplish?

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 tag.

Fixes #11215

How will you know you've accomplished your goal?

Before:

image

After:

image

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@yeikel yeikel requested a review from a team as a code owner December 16, 2025 03:34
@github-actions github-actions bot added the L: docker Docker containers label Dec 16, 2025
@yeikel yeikel force-pushed the fix/consider-tag branch 4 times, most recently from df3420b to 37c279c Compare December 16, 2025 19:49
@yeikel
Copy link
Copy Markdown
Contributor Author

yeikel commented Dec 16, 2025

@kbukum1 Any chance you can find me a reviewer for this change?

@kbukum1 kbukum1 moved this to Ready in Dependabot Dec 16, 2025
@kbukum1 kbukum1 self-assigned this Dec 16, 2025
@kbukum1
Copy link
Copy Markdown
Contributor

kbukum1 commented Dec 16, 2025

@yeikel

Seems like the change is causing an issue. I am taking approval back. Can you trace it according to the following error? Also, I believe we need a proper spec to catch this if possible.

NoMethodError: undefined method 'first' for an instance of String
    from docker/lib/dependabot/docker/update_checker.rb:243:in 'Dependabot::Docker::UpdateChecker#get_tag_publication_details'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Docker::UpdateChecker#_on_method_added'
    from docker/lib/dependabot/docker/update_checker.rb:230:in 'Dependabot::Docker::UpdateChecker#publication_detail'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Docker::UpdateChecker#_on_method_added'
    from docker/lib/dependabot/docker/update_checker.rb:214:in 'block in Dependabot::Docker::UpdateChecker#apply_cooldown'
    from docker/lib/dependabot/docker/update_checker.rb:213:in 'Array#reverse_each'
    from docker/lib/dependabot/docker/update_checker.rb:213:in 'Dependabot::Docker::UpdateChecker#apply_cooldown'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Docker::UpdateChecker#_on_method_added'
    from docker/lib/dependabot/docker/update_checker.rb:161:in 'Dependabot::Docker::UpdateChecker#fetch_latest_tag'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Docker::UpdateChecker#_on_method_added'
    from docker/lib/dependabot/docker/update_checker.rb:144:in 'Dependabot::Docker::UpdateChecker#latest_tag_from'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Docker::UpdateChecker#_on_method_added'
    from docker/lib/dependabot/docker/update_checker.rb:136:in 'Dependabot::Docker::UpdateChecker#latest_version_from'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Docker::UpdateChecker#_on_method_added'
    from docker/lib/dependabot/docker/update_checker.rb:26:in 'Dependabot::Docker::UpdateChecker#latest_version'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Docker::UpdateChecker#_on_method_added'
    from dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:268:in 'Dependabot::Updater::Operations::UpdateAllVersions#all_versions_ignored?'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Updater::Operations::UpdateAllVersions#_on_method_added'
    from dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:128:in 'Dependabot::Updater::Operations::UpdateAllVersions#check_and_create_pull_request'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Updater::Operations::UpdateAllVersions#_on_method_added'
    from dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:99:in 'Dependabot::Updater::Operations::UpdateAllVersions#check_and_create_pr_with_error_handling'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Updater::Operations::UpdateAllVersions#_on_method_added'
    from dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:59:in 'block in Dependabot::Updater::Operations::UpdateAllVersions#perform'
    from dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:59:in 'Array#each'
    from dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:59:in 'Dependabot::Updater::Operations::UpdateAllVersions#perform'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Updater::Operations::UpdateAllVersions#_on_method_added'
    from dependabot-updater/lib/dependabot/updater/operations/group_update_all_versions.rb:140:in 'block in Dependabot::Updater::Operations::GroupUpdateAllVersions#run_ungrouped_dependency_updates'
    from dependabot-updater/lib/dependabot/updater/operations/group_update_all_versions.rb:125:in 'Array#each'
    from dependabot-updater/lib/dependabot/updater/operations/group_update_all_versions.rb:125:in 'Dependabot::Updater::Operations::GroupUpdateAllVersions#run_ungrouped_dependency_updates'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Updater::Operations::GroupUpdateAllVersions#_on_method_added'
    from dependabot-updater/lib/dependabot/updater/operations/group_update_all_versions.rb:63:in 'Dependabot::Updater::Operations::GroupUpdateAllVersions#perform'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Updater::Operations::GroupUpdateAllVersions#_on_method_added'
    from dependabot-updater/lib/dependabot/updater.rb:56:in 'Dependabot::Updater#run'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Updater#_on_method_added'
    from dependabot-updater/lib/dependabot/update_files_command.rb:53:in 'block in Dependabot::UpdateFilesCommand#perform_job'
    from dependabot-updater/vendor/ruby/3.4.0/gems/opentelemetry-api-1.5.0/lib/opentelemetry/trace/tracer.rb:37:in 'block in OpenTelemetry::Trace::Tracer#in_span'
    from dependabot-updater/vendor/ruby/3.4.0/gems/opentelemetry-api-1.5.0/lib/opentelemetry/trace.rb:70:in 'block in OpenTelemetry::Trace#with_span'
    from dependabot-updater/vendor/ruby/3.4.0/gems/opentelemetry-api-1.5.0/lib/opentelemetry/context.rb:88:in 'OpenTelemetry::Context.with_value'
    from dependabot-updater/vendor/ruby/3.4.0/gems/opentelemetry-api-1.5.0/lib/opentelemetry/trace.rb:70:in 'OpenTelemetry::Trace#with_span'
    from dependabot-updater/vendor/ruby/3.4.0/gems/opentelemetry-api-1.5.0/lib/opentelemetry/trace/tracer.rb:37:in 'OpenTelemetry::Trace::Tracer#in_span'
    from dependabot-updater/lib/dependabot/update_files_command.rb:30:in 'Dependabot::UpdateFilesCommand#perform_job'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::UpdateFilesCommand#_on_method_added'
    from dependabot-updater/lib/dependabot/base_command.rb:42:in 'Dependabot::BaseCommand#run'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation_2_7.rb:652:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation_2_7.rb:652:in 'block in Dependabot::BaseCommand#create_validator_procedure_fast0'
    from bin/update_files.rb:48:in '<main>'
    ...

It looks like the variable being used in get_tag_publication_details (see docker/lib/dependabot/docker/update_checker.rb at line 243) is expected to be an Array but is now a String. Please check the changes to the tag/digest lookups to make sure the variable always has the correct type, even for single values.

A spec for this scenario would help catch this earlier. Thanks!

@kbukum1 kbukum1 self-requested a review December 16, 2025 22:41
@kbukum1
Copy link
Copy Markdown
Contributor

kbukum1 commented Dec 16, 2025

@yeikel
Also let me know if you need help. I didn't have much time to investigate but it seems to be related to change.

Copy link
Copy Markdown
Contributor

@kbukum1 kbukum1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to fix the data type error. Also we may need to add a spec to catch the wrong data type issue

@kbukum1 kbukum1 moved this from Ready to On Hold in Dependabot Dec 16, 2025
@yeikel
Copy link
Copy Markdown
Contributor Author

yeikel commented Dec 17, 2025

@yeikel

Seems like the change is causing an issue. I am taking approval back. Can you trace it according to the following error? Also, I believe we need a proper spec to catch this if possible.

NoMethodError: undefined method 'first' for an instance of String
    from docker/lib/dependabot/docker/update_checker.rb:243:in 'Dependabot::Docker::UpdateChecker#get_tag_publication_details'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Docker::UpdateChecker#_on_method_added'
    from docker/lib/dependabot/docker/update_checker.rb:230:in 'Dependabot::Docker::UpdateChecker#publication_detail'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Docker::UpdateChecker#_on_method_added'
    from docker/lib/dependabot/docker/update_checker.rb:214:in 'block in Dependabot::Docker::UpdateChecker#apply_cooldown'
    from docker/lib/dependabot/docker/update_checker.rb:213:in 'Array#reverse_each'
    from docker/lib/dependabot/docker/update_checker.rb:213:in 'Dependabot::Docker::UpdateChecker#apply_cooldown'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Docker::UpdateChecker#_on_method_added'
    from docker/lib/dependabot/docker/update_checker.rb:161:in 'Dependabot::Docker::UpdateChecker#fetch_latest_tag'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Docker::UpdateChecker#_on_method_added'
    from docker/lib/dependabot/docker/update_checker.rb:144:in 'Dependabot::Docker::UpdateChecker#latest_tag_from'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Docker::UpdateChecker#_on_method_added'
    from docker/lib/dependabot/docker/update_checker.rb:136:in 'Dependabot::Docker::UpdateChecker#latest_version_from'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Docker::UpdateChecker#_on_method_added'
    from docker/lib/dependabot/docker/update_checker.rb:26:in 'Dependabot::Docker::UpdateChecker#latest_version'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Docker::UpdateChecker#_on_method_added'
    from dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:268:in 'Dependabot::Updater::Operations::UpdateAllVersions#all_versions_ignored?'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Updater::Operations::UpdateAllVersions#_on_method_added'
    from dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:128:in 'Dependabot::Updater::Operations::UpdateAllVersions#check_and_create_pull_request'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Updater::Operations::UpdateAllVersions#_on_method_added'
    from dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:99:in 'Dependabot::Updater::Operations::UpdateAllVersions#check_and_create_pr_with_error_handling'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Updater::Operations::UpdateAllVersions#_on_method_added'
    from dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:59:in 'block in Dependabot::Updater::Operations::UpdateAllVersions#perform'
    from dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:59:in 'Array#each'
    from dependabot-updater/lib/dependabot/updater/operations/update_all_versions.rb:59:in 'Dependabot::Updater::Operations::UpdateAllVersions#perform'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Updater::Operations::UpdateAllVersions#_on_method_added'
    from dependabot-updater/lib/dependabot/updater/operations/group_update_all_versions.rb:140:in 'block in Dependabot::Updater::Operations::GroupUpdateAllVersions#run_ungrouped_dependency_updates'
    from dependabot-updater/lib/dependabot/updater/operations/group_update_all_versions.rb:125:in 'Array#each'
    from dependabot-updater/lib/dependabot/updater/operations/group_update_all_versions.rb:125:in 'Dependabot::Updater::Operations::GroupUpdateAllVersions#run_ungrouped_dependency_updates'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Updater::Operations::GroupUpdateAllVersions#_on_method_added'
    from dependabot-updater/lib/dependabot/updater/operations/group_update_all_versions.rb:63:in 'Dependabot::Updater::Operations::GroupUpdateAllVersions#perform'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Updater::Operations::GroupUpdateAllVersions#_on_method_added'
    from dependabot-updater/lib/dependabot/updater.rb:56:in 'Dependabot::Updater#run'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::Updater#_on_method_added'
    from dependabot-updater/lib/dependabot/update_files_command.rb:53:in 'block in Dependabot::UpdateFilesCommand#perform_job'
    from dependabot-updater/vendor/ruby/3.4.0/gems/opentelemetry-api-1.5.0/lib/opentelemetry/trace/tracer.rb:37:in 'block in OpenTelemetry::Trace::Tracer#in_span'
    from dependabot-updater/vendor/ruby/3.4.0/gems/opentelemetry-api-1.5.0/lib/opentelemetry/trace.rb:70:in 'block in OpenTelemetry::Trace#with_span'
    from dependabot-updater/vendor/ruby/3.4.0/gems/opentelemetry-api-1.5.0/lib/opentelemetry/context.rb:88:in 'OpenTelemetry::Context.with_value'
    from dependabot-updater/vendor/ruby/3.4.0/gems/opentelemetry-api-1.5.0/lib/opentelemetry/trace.rb:70:in 'OpenTelemetry::Trace#with_span'
    from dependabot-updater/vendor/ruby/3.4.0/gems/opentelemetry-api-1.5.0/lib/opentelemetry/trace/tracer.rb:37:in 'OpenTelemetry::Trace::Tracer#in_span'
    from dependabot-updater/lib/dependabot/update_files_command.rb:30:in 'Dependabot::UpdateFilesCommand#perform_job'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation.rb:282:in 'T::Private::Methods::CallValidation.validate_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/_methods.rb:277:in 'block in Dependabot::UpdateFilesCommand#_on_method_added'
    from dependabot-updater/lib/dependabot/base_command.rb:42:in 'Dependabot::BaseCommand#run'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation_2_7.rb:652:in 'UnboundMethod#bind_call'
    from dependabot-updater/vendor/ruby/3.4.0/gems/sorbet-runtime-0.6.12544/lib/types/private/methods/call_validation_2_7.rb:652:in 'block in Dependabot::BaseCommand#create_validator_procedure_fast0'
    from bin/update_files.rb:48:in '<main>'
    ...

It looks like the variable being used in get_tag_publication_details (see docker/lib/dependabot/docker/update_checker.rb at line 243) is expected to be an Array but is now a String. Please check the changes to the tag/digest lookups to make sure the variable always has the correct type, even for single values.

A spec for this scenario would help catch this earlier. Thanks!

Thank you for the review and for sharing the details.

The exception makes sense (and it’s unfortunate), but I’m a bit confused given the scope of my change. Are you confident this is caused by my change, rather than a separate, pre-existing production issue that just surfaced now?

I ask because, based on the call stack, the method I updated doesn’t appear to be involved in the failing execution path. Specifically, get_tag_publication_details is used for cooldown-related tag lookups, which shouldn’t be part of by my change.

I reviewed the execution path of my new method call digest_of(tag) and the failing method/method chain is not involved.

https://github.com/yeikel/dependabot-core/blob/c35b7414430c00a0a87c39835f84a27c591c42c3/docker/lib/dependabot/docker/update_checker.rb#L424-L429

I'd be happy to help investigate further but it honestly seems unrelated. Is this problem in the logs without my changes? Do you have access to the logs, the input payload, or a reproducible example that triggers the error?

@yeikel yeikel force-pushed the fix/consider-tag branch 2 times, most recently from 615e194 to 2ed382f Compare December 17, 2025 19:00
@kbukum1
Copy link
Copy Markdown
Contributor

kbukum1 commented Dec 18, 2025

5b7414430c00a0a87c39835f84a27c591c42c3/docker/lib/dependabot/docker/update_checker.rb#L424-L429

I'd be happy to help investigate further but it honestly seems unrelated. Is this problem in the logs without my changes? Do you have access to the logs, the input payload, or a reproducible example that triggers the error?

@yeikel ,
I will check and let you know.

@kbukum1
Copy link
Copy Markdown
Contributor

kbukum1 commented Dec 18, 2025

5b7414430c00a0a87c39835f84a27c591c42c3/docker/lib/dependabot/docker/update_checker.rb#L424-L429
I'd be happy to help investigate further but it honestly seems unrelated. Is this problem in the logs without my changes? Do you have access to the logs, the input payload, or a reproducible example that triggers the error?

@yeikel , I will check and let you know.

@yeikel ,

Sorry for troubling you. Yes the error was related to an existing error but because line numbers are changes it was showing as new error on Sentry. I already created a fix PR for it and after merging fix, I will also merge this PR.

@yeikel
Copy link
Copy Markdown
Contributor Author

yeikel commented Dec 18, 2025

5b7414430c00a0a87c39835f84a27c591c42c3/docker/lib/dependabot/docker/update_checker.rb#L424-L429
I'd be happy to help investigate further but it honestly seems unrelated. Is this problem in the logs without my changes? Do you have access to the logs, the input payload, or a reproducible example that triggers the error?

@yeikel , I will check and let you know.

@yeikel ,

Sorry for troubling you. Yes the error was related to an existing error but because line numbers are changes it was showing as new error on Sentry. I already created a fix PR for it and after merging fix, I will also merge this PR.

No problem. Thank you for taking the time to confirm

@yeikel yeikel force-pushed the fix/consider-tag branch 3 times, most recently from 3d10a68 to 13badc1 Compare December 18, 2025 17:21
@kbukum1 kbukum1 self-requested a review December 18, 2025 18:24
@kbukum1
Copy link
Copy Markdown
Contributor

kbukum1 commented Dec 18, 2025

Thanks @yeikel fixing the conflict. I was also trying to do it here. I will try to deploy that soon. Hopefully we will not have any issue.

@kbukum1 kbukum1 dismissed their stale review December 18, 2025 18:25

Fixed the problem in th following PR, https://github.com/github/github/pull/411983

Copy link
Copy Markdown
Contributor

@kbukum1 kbukum1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kbukum1 kbukum1 merged commit 82708b4 into dependabot:main Dec 18, 2025
56 checks passed
@github-project-automation github-project-automation bot moved this from On Hold to Done in Dependabot Dec 18, 2025
@yeikel yeikel deleted the fix/consider-tag branch December 18, 2025 18:45
@yeikel
Copy link
Copy Markdown
Contributor Author

yeikel commented Dec 18, 2025

Thanks @yeikel fixing the conflict. I was also trying to do it here. I will try to deploy that soon. Hopefully we will not have any issue.

Thank you for merging it. Please ping me if you find any issues as a result of this change

@pavera
Copy link
Copy Markdown
Contributor

pavera commented Dec 19, 2025

@yeikel, I'm not sure but I suspect this change is causing docker updates to no longer work. Our updates in github.com/github/dependabot-action now return update_not_possible

@yeikel
Copy link
Copy Markdown
Contributor Author

yeikel commented Dec 19, 2025

@yeikel, I'm not sure but I suspect this change is causing docker updates to no longer work. Our updates in github.com/github/dependabot-action now return update_not_possible

Thanks for the message. I'll investigate with high priority and get back today

@kbukum1
Copy link
Copy Markdown
Contributor

kbukum1 commented Dec 19, 2025

@yeikel, see below for my findings. In the following code you may want to check next true if expected_digest.nil? which seems to be reason but not sure. I’m planning to revert the recent change for now. Once we’ve investigated and resolved the issue, we can follow up with a proper fix and accompanying spec in a new PR.

CC: @pavera


Relevant code:

sig { returns(T::Boolean) }
def digest_up_to_date?
  return true unless updated_digest

  digest_requirements.all? do |req|
    source = req.fetch(:source)
    source_digest = source.fetch(:digest)
    source_tag = source[:tag]

    expected_digest =
      if source_tag
        digest_of(source_tag)
      else
        updated_digest
      end

    # If we can't determine the expected digest (e.g., due to transient registry errors),
    # we can't prove the digest is out of date, so conservatively assume it's up to date.
    # This prevents false positives where we incorrectly mark dependencies as needing updates.
    next true if expected_digest.nil?

    source_digest == expected_digest
  end
end

@kbukum1
Copy link
Copy Markdown
Contributor

kbukum1 commented Dec 19, 2025

@yeikel ,

Just let you know. I am reverting this for now. When we have complete solution with the fix, we can deploy a new PR. Also please note that, it will be great also to have a spec with the fix to catch this so we can be sure we are not going to have issue. Let me know if you are not available for this, so that I can check it later in my availability.

#13840

CC: @pavera

@yeikel
Copy link
Copy Markdown
Contributor Author

yeikel commented Dec 19, 2025

Apologies for the noise. I'll check and confirm and get back with more tests

@yeikel
Copy link
Copy Markdown
Contributor Author

yeikel commented Dec 19, 2025

For what is worth, I do not see any registry failures in the job: https://github.com/github/dependabot-action/actions/runs/20377428237/job/58559469679

So it is unclear if that's the actual reason. In any case, I'll investigate and confirm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L: docker Docker containers

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Dependabot fails for Docker updates with multiple tags in the same image

3 participants