Skip to content

Very slow dependency resolving #5689

@cmhe

Description

@cmhe

Describe the problem as clearly as you can

The step to resolve the project dependencies with bundler takes multiple hours.

Did you try upgrading rubygems & bundler?

I tried it with 2.3.17 and a couple of other older releases of bundler:

$ bundle --version
Bundler version 2.3.17

Post steps to reproduce the problem

With this Gemfile:

source ENV['GEM_SOURCE'] || 'https://rubygems.org'

  gem "puppet-module-posix-default-r2.7", '~> 1.0', require: false
  gem "puppet-module-posix-dev-r2.7", '~> 1.0',     require: false
  gem "github_changelog_generator",                 require: false
  gem "puppet-module-posix-system-r2.7", '~> 1.0',  require: false
  gem "librarian-puppet",                           require: false

I also tried it inside a Docker container:

FROM ruby:2.7.6-slim

ADD Gemfile /root/Gemfile

RUN gem install --version '= 2.3.17' bundler && \
        bundle --version && \
        cd /root && \
        bundle config set --local path vendor/bundle && \
        bash -c 'time bundle install'

The build inside the Docker container fails, because of missing build dependencies, however bundler mostly spends resolving dependencies there and the final time output, after it fails to build is:

real    332m27.595s
user    331m56.310s
sys     0m21.727s

So over 5 hours.

Which is the same on my host, where the build of those dependencies succeeds.

Which command did you run?

bundle config set --local path vendor/bundle
bundle install

With the Gemfile posted above in place.

What were you expecting to happen?

Resolving dependencies in under 5 minutes.

What actually happened?

Resolving dependencies in over 5 hours.

If not included with the output of your command, run bundle env and paste the output below

I used the docker container, so the environment should be clear. I can however post it as well if required...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions