Dependabot (standalone) with docker/terraform provider doesn't seem to work
Hello,
i am about to integrate dependabot standalone into our self hosted gitlab. While for gomod this works out of the box pretty solid (good job!), i am having trouble with getting docker and terraform to work. My dependabot.yml looks like:
version: 2
registries:
dockerhub:
type: docker-registry
url: https://registry.hub.docker.com
username: x
password: y
ecr-docker:
type: docker-registry
url: https://12345678910.dkr.ecr.eu-central-1.amazonaws.com
username: a
password: b
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 20
rebase-strategy: auto
commit-message:
prefix: "refs #0: dependency update;\n - "
- package-ecosystem: docker
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 20
rebase-strategy: auto
registries:
- dockerhub
- ecr-docker
- package-ecosystem: terraform
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 20
rebase-strategy: auto
I have tried it with the directory where the dockerfile actually lies, but that didn't help either.
When using "/" as the directory i get:
$ bundle exec rake "dependabot:update[$PROJECT_PATH,$PACKAGE_MANAGER,$DIRECTORY]"
rake aborted!
Dependabot::DependencyFileNotFound: Dependabot::DependencyFileNotFound
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/dependabot-docker-0.169.5/lib/dependabot/docker/file_fetcher.rb:26:in `fetch_files'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/dependabot-common-0.169.5/lib/dependabot/file_fetchers/base.rb:65:in `files'
/home/dependabot/app/app/services/dependabot/dependency_updater.rb:60:in `dependencies'
/home/dependabot/app/app/services/dependabot/dependency_updater.rb:37:in `dependency_list'
/home/dependabot/app/app/services/dependabot/dependency_updater.rb:17:in `call'
/home/dependabot/app/app/services/application_service.rb:7:in `call'
/home/dependabot/app/app/services/dependabot/update_service.rb:108:in `all_updated_dependencies'
/home/dependabot/app/app/services/dependabot/update_service.rb:100:in `all_vulnerable_dependencies'
/home/dependabot/app/app/services/dependabot/update_service.rb:124:in `update_security_vulnerabilities'
/home/dependabot/app/app/services/dependabot/update_service.rb:21:in `block in call'
/home/dependabot/app/app/services/semaphore.rb:5:in `synchronize'
/home/dependabot/app/app/services/semaphore.rb:5:in `synchronize'
/home/dependabot/app/app/services/dependabot/update_service.rb:20:in `call'
/home/dependabot/app/app/services/application_service.rb:7:in `call'
/home/dependabot/app/app/jobs/dependency_update_job.rb:19:in `perform'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/execution.rb:48:in `block in perform_now'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/i18n-1.8.11/lib/i18n.rb:309:in `with_locale'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `instance_exec'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/core_ext/time/zones.rb:66:in `use_zone'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/timezones.rb:9:in `block (2 levels) in <module:Timezones>'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `instance_exec'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/instrumentation.rb:21:in `block in instrument'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/notifications.rb:203:in `block in instrument'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/notifications.rb:203:in `instrument'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/instrumentation.rb:31:in `instrument'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/instrumentation.rb:14:in `block (2 levels) in <module:Instrumentation>'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `instance_exec'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/logging.rb:24:in `tag_logger'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/logging.rb:15:in `block (2 levels) in <module:Logging>'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `instance_exec'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:137:in `run_callbacks'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/execution.rb:47:in `perform_now'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/execution.rb:18:in `perform_now'
/home/dependabot/app/lib/tasks/dependabot.rake:9:in `block (2 levels) in <main>'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/sentry-ruby-core-4.8.1/lib/sentry/rake.rb:24:in `execute'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
Tasks: TOP => dependabot:update
(See full trace by running task with --trace)
[2021-12-14 14:40:33 +0000 tid=1afe] INFO: [mygroup/myproject=>docker] Fetching configuration for mygroup/myproject from 1-dependabot-implementation
When i set directory to the directory where the dockerfile lies, is get:
$ bundle exec rake "dependabot:update[$PROJECT_PATH,$PACKAGE_MANAGER,$DIRECTORY]"
rake aborted!
Configuration missing entry with package-ecosystem: docker
/home/dependabot/app/app/services/dependabot/update_service.rb:65:in `fetch_config'
/home/dependabot/app/app/services/dependabot/update_service.rb:18:in `call'
/home/dependabot/app/app/services/application_service.rb:7:in `call'
/home/dependabot/app/app/jobs/dependency_update_job.rb:19:in `perform'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/execution.rb:48:in `block in perform_now'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/i18n-1.8.11/lib/i18n.rb:309:in `with_locale'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `instance_exec'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/core_ext/time/zones.rb:66:in `use_zone'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/timezones.rb:9:in `block (2 levels) in <module:Timezones>'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `instance_exec'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/instrumentation.rb:21:in `block in instrument'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/notifications.rb:203:in `block in instrument'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/notifications.rb:203:in `instrument'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/instrumentation.rb:31:in `instrument'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/instrumentation.rb:14:in `block (2 levels) in <module:Instrumentation>'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `instance_exec'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/logging.rb:24:in `tag_logger'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/logging.rb:15:in `block (2 levels) in <module:Logging>'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `instance_exec'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:137:in `run_callbacks'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/execution.rb:47:in `perform_now'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/activejob-6.1.4.1/lib/active_job/execution.rb:18:in `perform_now'
/home/dependabot/app/lib/tasks/dependabot.rake:9:in `block (2 levels) in <main>'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/sentry-ruby-core-4.8.1/lib/sentry/rake.rb:24:in `execute'
/home/dependabot/app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
Tasks: TOP => dependabot:update
(See full trace by running task with --trace)
[2021-12-14 14:24:21 +0000 tid=1afe] INFO: [mygroup/myproject] Fetching configuration for mygroup/myproject from 1-dependabot-implementation
The github documentation to dependabot in combination with docker/terraform is a bit "limited", so i'm not sure how to proceed here, unless i dig into the code.