admin管理员组

文章数量:1123507

Running dependabot on Github on our large Rails project times out (the job is killed after 55 minutes).

Our Gemfile has 176 gems, 151 which use the ~> operator, so Dependabot will try to upgrade them. I am posting the dependabot log for net-smtp, which appears in our Gemfile like so:

gem "net-smtp", "~> 0.3.3", require: false

this is the dependabot log:

updater | 2025/01/10 09:37:10 INFO <job_946026945> Checking if net-smtp 0.3.4 needs updating
updater | 2025/01/10 09:37:10 INFO <job_946026945> Started process PID: 2397 with command: {"BUNDLE_PATH"=>"/home/dependabot/dependabot-updater/tmp/20250110-1258-szlcms/.bundle", "GEM_HOME"=>"/opt/bundler/v2/.bundle"} ruby /opt/bundler/v2/run.rb
updater | 2025/01/10 09:37:10 INFO <job_946026945> Process PID: 2397 completed with status: pid 2397 exit 0
updater | 2025/01/10 09:37:10 INFO <job_946026945> Total execution time: 0.23 seconds
  proxy | 2025/01/10 09:37:10 [688] GET :443/api/v1/versions/net-smtp.json
  proxy | 2025/01/10 09:37:10 [688] 200 :443/api/v1/versions/net-smtp.json
updater | 2025/01/10 09:37:10 INFO <job_946026945> Latest version is 0.5.0
updater | 2025/01/10 09:37:10 INFO <job_946026945> Started process PID: 2409 with command: {} git config --global credential.helper '!/home/dependabot/common/lib/dependabot/../../bin/git-credential-store-immutable --file /home/dependabot/dependabot-updater/git.store' {}
updater | 2025/01/10 09:37:10 INFO <job_946026945> Process PID: 2409 completed with status: pid 2409 exit 0
updater | 2025/01/10 09:37:10 INFO <job_946026945> Total execution time: 0.01 seconds
updater | 2025/01/10 09:37:10 INFO <job_946026945> Started process PID: 2416 with command: {} git config --global --replace-all url./.insteadOf ssh://[email protected]/ {}
updater | 2025/01/10 09:37:10 INFO <job_946026945> Process PID: 2416 completed with status: pid 2416 exit 0
2025/01/10 09:37:10 INFO <job_946026945> Total execution time: 0.01 seconds
updater | 2025/01/10 09:37:10 INFO <job_946026945> Started process PID: 2422 with command: {} git config --global --add url./.insteadOf ssh://[email protected]: {}
updater | 2025/01/10 09:37:10 INFO <job_946026945> Process PID: 2422 completed with status: pid 2422 exit 0
updater | 2025/01/10 09:37:10 INFO <job_946026945> Total execution time: 0.01 seconds
updater | 2025/01/10 09:37:10 INFO <job_946026945> Started process PID: 2428 with command: {} git config --global --add url./.insteadOf [email protected]: {}
updater | 2025/01/10 09:37:10 INFO <job_946026945> Process PID: 2428 completed with status: pid 2428 exit 0
2025/01/10 09:37:10 INFO <job_946026945> Total execution time: 0.01 seconds
updater | 2025/01/10 09:37:10 INFO <job_946026945> Started process PID: 2434 with command: {} git config --global --add url./.insteadOf [email protected]/ {}
updater | 2025/01/10 09:37:10 INFO <job_946026945> Process PID: 2434 completed with status: pid 2434 exit 0
updater | 2025/01/10 09:37:10 INFO <job_946026945> Total execution time: 0.01 seconds
updater | 2025/01/10 09:37:10 INFO <job_946026945> Started process PID: 2440 with command: {} git config --global --add url./.insteadOf git://github/ {}
updater | 2025/01/10 09:37:10 INFO <job_946026945> Process PID: 2440 completed with status: pid 2440 exit 0
updater | 2025/01/10 09:37:10 INFO <job_946026945> Total execution time: 0.01 seconds
updater | 2025/01/10 09:37:10 INFO <job_946026945> Started process PID: 2446 with command: {} git reset HEAD --hard {}
updater | 2025/01/10 09:37:10 INFO <job_946026945> Process PID: 2446 completed with status: pid 2446 exit 0
updater | 2025/01/10 09:37:10 INFO <job_946026945> Total execution time: 0.16 seconds
updater | 2025/01/10 09:37:10 INFO <job_946026945> Started process PID: 2452 with command: {} git clean -fx {}
updater | 2025/01/10 09:37:10 INFO <job_946026945> Process PID: 2452 completed with status: pid 2452 exit 0
updater | 2025/01/10 09:37:10 INFO <job_946026945> Total execution time: 0.07 seconds
updater | 2025/01/10 09:37:10 INFO <job_946026945> Started process PID: 2458 with command: {"BUNDLE_PATH"=>"/home/dependabot/dependabot-updater/tmp/20250110-1258-szlcms/.bundle", "GEM_HOME"=>"/opt/bundler/v2/.bundle"} ruby /opt/bundler/v2/run.rb
  proxy | 2025/01/10 09:37:12 [690] GET :443/FOO/versions
  proxy | 2025/01/10 09:37:12 [690] 304 :443/FOO/versions
  proxy | 2025/01/10 09:37:13 [692] GET :443/versions
2025/01/10 09:37:13 [692] 304 :443/versions
  proxy | 2025/01/10 09:38:03 Posting metrics to remote API endpoint
  proxy | 2025/01/10 09:38:03 Successfully posted metrics data via api client
updater | 2025/01/10 09:38:13 INFO <job_946026945> Process PID: 2458 completed with status: pid 2458 exit 0
updater | 2025/01/10 09:38:13 INFO <job_946026945> Total execution time: 63.11 seconds
updater | 2025/01/10 09:38:13 INFO <job_946026945> Requirements to unlock update_not_possible
2025/01/10 09:38:13 INFO <job_946026945> Requirements update strategy lockfile_only
2025/01/10 09:38:13 INFO <job_946026945> No update possible for net-smtp 0.3.4
  proxy | 2025/01/10 09:38:13 [694] POST /update_jobs/946026945/record_ecosystem_meta
  proxy | 2025/01/10 09:38:13 [694] 204 /update_jobs/946026945/record_ecosystem_meta

If I understand correctly, it is the following line that takes so much:

updater | 2025/01/10 09:37:10 INFO <job_946026945> Started process PID: 2458 with command: {"BUNDLE_PATH"=>"/home/dependabot/dependabot-updater/tmp/20250110-1258-szlcms/.bundle", "GEM_HOME"=>"/opt/bundler/v2/.bundle"} ruby /opt/bundler/v2/run.rb

When I run locally bundle update net-smtp, it only takes 6 seconds (again it's not able to update the depencency, but it takes significantly longer).

What happens for net-smtp also happens for multiple other dependencies, so the time adds up to more than 55 minutes, hence the timeout.

This is our dependabot.yml

version: 2
registries:
  Myrepo:
    type: rubygems-server
    url: 
    token: ${{ secrets.GH_PACKAGES_RO }}
updates:
  - package-ecosystem: "bundler" # See documentation for possible values
    insecure-external-code-execution: "allow" # for external repository to work
    directory: "/" # Location of package manifests
    schedule:
      interval: daily
    registries:
      - Myrepo
    open-pull-requests-limit: 3
    versioning-strategy: lockfile-only
    allow:
      - dependency-type: direct
    labels:
      - "dependencies"
      - "ruby"

Do you have any tips to improve the performance?

本文标签: rubyDependabot for big Rails project times outStack Overflow