NoMethodError: undefined method `default_branch'
Hello,
I'm trying to set up the standalone version following https://gitlab.com/dependabot-gitlab/dependabot-standalone and I'm getting the error shown below.
I looked for solutions but I cannot find anything related. Is there anything I could check that could help me out?
Thanks a lot!
$ cd /home/dependabot
$ bundle exec rake "dependabot:update[$PROJECT_PATH,$PACKAGE_MANAGER,$DIRECTORY]"
rake aborted!
NoMethodError: undefined method `default_branch' for #<Gitlab::PaginatedResponse:0x00005584cfd61880>
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/gitlab-4.17.0/lib/gitlab/paginated_response.rb:24:in `method_missing'
/home/dependabot/app/services/gitlab/default_branch.rb:15:in `block in call'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/cache.rb:746:in `block in save_block_result_to_cache'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/cache.rb:720:in `block in instrument'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/notifications.rb:205:in `instrument'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/cache.rb:720:in `instrument'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/cache.rb:745:in `save_block_result_to_cache'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/cache.rb:337:in `fetch'
/home/dependabot/app/services/gitlab/default_branch.rb:14:in `call'
/home/dependabot/app/services/application_service.rb:7:in `call'
/home/dependabot/app/services/dependabot/config.rb:18:in `call'
/home/dependabot/app/services/application_service.rb:7:in `call'
/home/dependabot/app/services/update_service.rb:31:in `fetch_config'
/home/dependabot/app/services/update_service.rb:13:in `call'
/home/dependabot/app/services/application_service.rb:7:in `call'
/home/dependabot/app/jobs/dependency_update_job.rb:17:in `perform'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activejob-6.1.3/lib/active_job/execution.rb:48:in `block in perform_now'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.9/lib/i18n.rb:309:in `with_locale'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activejob-6.1.3/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/callbacks.rb:126:in `instance_exec'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/core_ext/time/zones.rb:66:in `use_zone'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activejob-6.1.3/lib/active_job/timezones.rb:9:in `block (2 levels) in <module:Timezones>'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/callbacks.rb:126:in `instance_exec'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activejob-6.1.3/lib/active_job/instrumentation.rb:21:in `block in instrument'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/notifications.rb:203:in `block in instrument'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/notifications.rb:203:in `instrument'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activejob-6.1.3/lib/active_job/instrumentation.rb:31:in `instrument'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activejob-6.1.3/lib/active_job/instrumentation.rb:14:in `block (2 levels) in <module:Instrumentation>'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/callbacks.rb:126:in `instance_exec'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activejob-6.1.3/lib/active_job/logging.rb:24:in `tag_logger'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activejob-6.1.3/lib/active_job/logging.rb:15:in `block (2 levels) in <module:Logging>'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/callbacks.rb:126:in `instance_exec'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.3/lib/active_support/callbacks.rb:137:in `run_callbacks'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activejob-6.1.3/lib/active_job/execution.rb:47:in `perform_now'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/activejob-6.1.3/lib/active_job/execution.rb:18:in `perform_now'
/home/dependabot/lib/tasks/dependabot.rake:6:in `block (2 levels) in <main>'
/home/dependabot/vendor/bundle/ruby/2.6.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
Tasks: TOP => dependabot:update
(See full trace by running task with --trace)
[2021-04-07 07:43:35 +0000 tid=gny4gq4iy] INFO: Raven 3.1.1 configured not to capture errors: DSN not set
dependabot.yml
version: 2
updates:
- package-ecosystem: $PACKAGE_MANAGER_SET
directory: $DIRECTORY
schedule:
interval: daily
rebase-strategy: "disabled"
// I added this to see if it will fix the error
target-branch: "master"
.gitlab.ci
.dependabot-gitlab:
image:
name: docker.io/andrcuns/dependabot-gitlab:latest
entrypoint: [""]
variables:
GIT_STRATEGY: none
PACKAGE_MANAGER: $CI_JOB_NAME
RAILS_ENV: production
SETTINGS__STANDALONE: "true"
SETTINGS__GITLAB_URL: https://gitlab.com
SETTINGS__GITLAB_ACCESS_TOKEN: $SETTINGS__GITLAB_ACCESS_TOKEN
DIRECTORY: $DIRECTORY
before_script:
- cd /home/dependabot
script:
- bundle exec rake "dependabot:update[$PROJECT_PATH,$PACKAGE_MANAGER,$DIRECTORY]"
only:
- schedules
npm:
extends: .dependabot-gitlab
only:
variables:
- $PACKAGE_MANAGER_SET =~ "npm"