Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundler hangs at resolving dependencies on Alpine #5871

Closed
slhck opened this issue Aug 24, 2022 · 7 comments · Fixed by #5875
Closed

Bundler hangs at resolving dependencies on Alpine #5871

slhck opened this issue Aug 24, 2022 · 7 comments · Fixed by #5875
Labels

Comments

@slhck
Copy link

slhck commented Aug 24, 2022

Describe the problem as clearly as you can

Bundler v2.3.21 does not resolve dependencies.

v2.3.20 installs everything just fine.

Did you try upgrading rubygems & bundler?

Yes, this is apparently only with the latest version.

Post steps to reproduce the problem

I am using the ruby:3.0.4-alpine3.15 Docker image.

Which command did you run?

gem install bundler --no-document
bundle install --no-cache --jobs $(($(nproc) * 2))

What were you expecting to happen?

Successful installation of the gems.

What actually happened?

$ bundle install --no-cache --jobs $(($(nproc) * 2))
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies.....
Resolving dependencies.....
Resolving dependencies....
Resolving dependencies....

The regression between v2.3.20 and v2.3.21 is clear. When I freeze it to 2.3.20, the installation works.

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

Click to expand
Bundler       2.3.21
  Platforms   ruby, aarch64-linux-musl
Ruby          3.0.4p208 (2022-04-12 revision 3fa771ddedac25560be57f4055f1767e6c810f58) [aarch64-linux-musl]
  Full Path   /usr/local/bin/ruby
  Config Dir  /usr/local/etc
RubyGems      3.2.33
  Gem Home    /usr/local/bundle
  Gem Path    /root/.local/share/gem/ruby/3.0.0:/usr/local/lib/ruby/gems/3.0.0:/usr/local/bundle
  User Home   /root
  User Path   /root/.local/share/gem/ruby/3.0.0
  Bin Dir     /usr/local/bundle/bin
Tools         
  Git         not installed
  RVM         not installed
  rbenv       not installed
  chruby      not installed
```

Bundler Build Metadata

Built At          2022-08-24
Git SHA           d54be5fdd8
Released Version  true

Bundler settings

app_config
  Set via BUNDLE_APP_CONFIG: "/usr/local/bundle"
no_cache
  Set via BUNDLE_NO_CACHE: "1"
silence_root_warning
  Set via BUNDLE_SILENCE_ROOT_WARNING: true

Gemfile

Gemfile

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.0.4'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.1'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
gem 'activerecord-postgis-adapter'

# Authentication and Authorization
gem 'devise'
gem 'cancancan'
gem 'jwt'

# Multiple table inheritance, see https://github.com/chaadow/active_record-acts_as
gem 'active_record-acts_as'

# Record versions
gem 'paper_trail'

# Serialization
gem 'blueprinter'

# Use Puma as the app server
gem 'puma', '~> 4.3'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'

# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'

# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false

# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
gem 'rack-cors'
gem 'rack-utf8_sanitizer'

# Unicorn server
gem 'unicorn'
gem 'foreman'

# Worker
gem 'sidekiq'
gem 'sidekiq-unique-jobs', '>= 7.0.4'

# UA parsing
gem 'browser'

# Geocoding
gem 'geocoder'

# YouTube API
gem 'yt'

# Logging
gem 'elasticsearch'
gem 'elasticsearch-model'
# kept at < 4 because of:
# https://github.com/elastic/apm-agent-ruby/issues/1147
gem 'elastic-apm'
gem 'lograge'
gem 'logstash-event'
gem 'logstash-logger'
gem 'patron'

# Faster imports
gem 'activerecord-import'

# Parallel processing
gem 'parallel'

# State machines
gem 'aasm'

# Factory bot and faker
gem 'factory_bot_rails'
gem 'faker'

# pagination
gem 'pagy'
gem 'api-pagination'

# SQL counting
gem 'groupdate'

# Prometheus
gem 'prometheus_exporter'

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  gem 'database_cleaner'
  gem 'shoulda-matchers'
  gem 'rspec-rails', '~> 5.0'
  gem 'squasher'
  gem 'rspec_api_documentation'
  gem 'json_matchers'
  gem 'simplecov', require: false
  gem 'webmock'
end

group :test do
  # This has the effect of not pushing enqueued jobs to Redis but to a job array to enable testing
  gem 'rspec-sidekiq'
end

group :development do
  # Access IRB console
  gem 'web-console'
  gem 'listen'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-commands-rspec'
  gem 'spring-watcher-listen', '~> 2.0.0'
  gem 'rails-erd'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data'

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    aasm (5.3.0)
      concurrent-ruby (~> 1.0)
    actioncable (6.1.6.1)
      actionpack (= 6.1.6.1)
      activesupport (= 6.1.6.1)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
    actionmailbox (6.1.6.1)
      actionpack (= 6.1.6.1)
      activejob (= 6.1.6.1)
      activerecord (= 6.1.6.1)
      activestorage (= 6.1.6.1)
      activesupport (= 6.1.6.1)
      mail (>= 2.7.1)
    actionmailer (6.1.6.1)
      actionpack (= 6.1.6.1)
      actionview (= 6.1.6.1)
      activejob (= 6.1.6.1)
      activesupport (= 6.1.6.1)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (6.1.6.1)
      actionview (= 6.1.6.1)
      activesupport (= 6.1.6.1)
      rack (~> 2.0, >= 2.0.9)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.2.0)
    actiontext (6.1.6.1)
      actionpack (= 6.1.6.1)
      activerecord (= 6.1.6.1)
      activestorage (= 6.1.6.1)
      activesupport (= 6.1.6.1)
      nokogiri (>= 1.8.5)
    actionview (6.1.6.1)
      activesupport (= 6.1.6.1)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.1, >= 1.2.0)
    active_record-acts_as (5.0.3)
      activerecord (>= 6.0)
      activesupport (>= 6.0)
      ruby2_keywords
    activejob (6.1.6.1)
      activesupport (= 6.1.6.1)
      globalid (>= 0.3.6)
    activemodel (6.1.6.1)
      activesupport (= 6.1.6.1)
    activerecord (6.1.6.1)
      activemodel (= 6.1.6.1)
      activesupport (= 6.1.6.1)
    activerecord-import (1.4.0)
      activerecord (>= 4.2)
    activerecord-postgis-adapter (7.1.1)
      activerecord (~> 6.1)
      rgeo-activerecord (~> 7.0.0)
    activestorage (6.1.6.1)
      actionpack (= 6.1.6.1)
      activejob (= 6.1.6.1)
      activerecord (= 6.1.6.1)
      activesupport (= 6.1.6.1)
      marcel (~> 1.0)
      mini_mime (>= 1.1.0)
    activesupport (6.1.6.1)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      tzinfo (~> 2.0)
      zeitwerk (~> 2.3)
    addressable (2.8.0)
      public_suffix (>= 2.0.2, < 5.0)
    api-pagination (5.0.0)
    bcrypt (3.1.18)
    bindex (0.8.1)
    blueprinter (0.25.3)
    bootsnap (1.13.0)
      msgpack (~> 1.2)
    browser (5.3.1)
    brpoplpush-redis_script (0.1.2)
      concurrent-ruby (~> 1.0, >= 1.0.5)
      redis (>= 1.0, <= 5.0)
    builder (3.2.4)
    byebug (11.1.3)
    cancancan (3.4.0)
    choice (0.2.0)
    concurrent-ruby (1.1.10)
    connection_pool (2.2.5)
    crack (0.4.5)
      rexml
    crass (1.0.6)
    database_cleaner (2.0.1)
      database_cleaner-active_record (~> 2.0.0)
    database_cleaner-active_record (2.0.1)
      activerecord (>= 5.a)
      database_cleaner-core (~> 2.0.0)
    database_cleaner-core (2.0.1)
    devise (4.8.1)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 4.1.0)
      responders
      warden (~> 1.2.3)
    diff-lcs (1.5.0)
    docile (1.4.0)
    domain_name (0.5.20190701)
      unf (>= 0.0.5, < 1.0.0)
    elastic-apm (4.5.1)
      concurrent-ruby (~> 1.0)
      http (>= 3.0)
    elasticsearch (7.17.1)
      elasticsearch-api (= 7.17.1)
      elasticsearch-transport (= 7.17.1)
    elasticsearch-api (7.17.1)
      multi_json
    elasticsearch-model (7.2.1)
      activesupport (> 3)
      elasticsearch (~> 7)
      hashie
    elasticsearch-transport (7.17.1)
      faraday (~> 1)
      multi_json
    erubi (1.11.0)
    factory_bot (6.2.1)
      activesupport (>= 5.0.0)
    factory_bot_rails (6.2.0)
      factory_bot (~> 6.2.0)
      railties (>= 5.0.0)
    faker (2.22.0)
      i18n (>= 1.8.11, < 2)
    faraday (1.10.1)
      faraday-em_http (~> 1.0)
      faraday-em_synchrony (~> 1.0)
      faraday-excon (~> 1.1)
      faraday-httpclient (~> 1.0)
      faraday-multipart (~> 1.0)
      faraday-net_http (~> 1.0)
      faraday-net_http_persistent (~> 1.0)
      faraday-patron (~> 1.0)
      faraday-rack (~> 1.0)
      faraday-retry (~> 1.0)
      ruby2_keywords (>= 0.0.4)
    faraday-em_http (1.0.0)
    faraday-em_synchrony (1.0.0)
    faraday-excon (1.1.0)
    faraday-httpclient (1.0.1)
    faraday-multipart (1.0.4)
      multipart-post (~> 2)
    faraday-net_http (1.0.1)
    faraday-net_http_persistent (1.2.0)
    faraday-patron (1.0.0)
    faraday-rack (1.0.0)
    faraday-retry (1.0.3)
    ffi (1.15.5)
    ffi-compiler (1.0.1)
      ffi (>= 1.0.0)
      rake
    foreman (0.87.2)
    geocoder (1.8.0)
    globalid (1.0.0)
      activesupport (>= 5.0)
    groupdate (6.1.0)
      activesupport (>= 5.2)
    hashdiff (1.0.1)
    hashie (5.0.0)
    http (5.1.0)
      addressable (~> 2.8)
      http-cookie (~> 1.0)
      http-form_data (~> 2.2)
      llhttp-ffi (~> 0.4.0)
    http-cookie (1.0.5)
      domain_name (~> 0.5)
    http-form_data (2.3.0)
    i18n (1.12.0)
      concurrent-ruby (~> 1.0)
    jbuilder (2.11.5)
      actionview (>= 5.0.0)
      activesupport (>= 5.0.0)
    json_matchers (0.11.1)
      json_schema
    json_schema (0.21.0)
    jwt (2.4.1)
    kgio (2.11.4)
    listen (3.7.1)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    llhttp-ffi (0.4.0)
      ffi-compiler (~> 1.0)
      rake (~> 13.0)
    lograge (0.12.0)
      actionpack (>= 4)
      activesupport (>= 4)
      railties (>= 4)
      request_store (~> 1.0)
    logstash-event (1.2.02)
    logstash-logger (0.26.1)
      logstash-event (~> 1.2)
    loofah (2.18.0)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    mail (2.7.1)
      mini_mime (>= 0.1.1)
    marcel (1.0.2)
    method_source (1.0.0)
    mini_mime (1.1.2)
    minitest (5.16.3)
    msgpack (1.5.4)
    multi_json (1.15.0)
    multipart-post (2.2.3)
    mustache (1.1.1)
    nio4r (2.5.8)
    nokogiri (1.13.8-aarch64-linux)
      racc (~> 1.4)
    orm_adapter (0.5.0)
    pagy (5.10.1)
      activesupport
    paper_trail (13.0.0)
      activerecord (>= 5.2)
      request_store (~> 1.1)
    parallel (1.22.1)
    patron (0.13.3)
    pg (1.4.3)
    prometheus_exporter (2.0.3)
      webrick
    public_suffix (4.0.7)
    puma (4.3.12)
      nio4r (~> 2.0)
    racc (1.6.0)
    rack (2.2.4)
    rack-cors (1.1.1)
      rack (>= 2.0.0)
    rack-test (2.0.2)
      rack (>= 1.3)
    rack-utf8_sanitizer (1.7.0)
      rack (>= 1.0, < 3.0)
    rails (6.1.6.1)
      actioncable (= 6.1.6.1)
      actionmailbox (= 6.1.6.1)
      actionmailer (= 6.1.6.1)
      actionpack (= 6.1.6.1)
      actiontext (= 6.1.6.1)
      actionview (= 6.1.6.1)
      activejob (= 6.1.6.1)
      activemodel (= 6.1.6.1)
      activerecord (= 6.1.6.1)
      activestorage (= 6.1.6.1)
      activesupport (= 6.1.6.1)
      bundler (>= 1.15.0)
      railties (= 6.1.6.1)
      sprockets-rails (>= 2.0.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-erd (1.7.2)
      activerecord (>= 4.2)
      activesupport (>= 4.2)
      choice (~> 0.2.0)
      ruby-graphviz (~> 1.2)
    rails-html-sanitizer (1.4.3)
      loofah (~> 2.3)
    railties (6.1.6.1)
      actionpack (= 6.1.6.1)
      activesupport (= 6.1.6.1)
      method_source
      rake (>= 12.2)
      thor (~> 1.0)
    raindrops (0.20.0)
    rake (13.0.6)
    rb-fsevent (0.11.1)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    redis (4.7.1)
    request_store (1.5.1)
      rack (>= 1.4)
    responders (3.0.1)
      actionpack (>= 5.0)
      railties (>= 5.0)
    rexml (3.2.5)
    rgeo (2.4.0)
    rgeo-activerecord (7.0.1)
      activerecord (>= 5.0)
      rgeo (>= 1.0.0)
    rspec (3.11.0)
      rspec-core (~> 3.11.0)
      rspec-expectations (~> 3.11.0)
      rspec-mocks (~> 3.11.0)
    rspec-core (3.11.0)
      rspec-support (~> 3.11.0)
    rspec-expectations (3.11.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.11.0)
    rspec-mocks (3.11.1)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.11.0)
    rspec-rails (5.1.2)
      actionpack (>= 5.2)
      activesupport (>= 5.2)
      railties (>= 5.2)
      rspec-core (~> 3.10)
      rspec-expectations (~> 3.10)
      rspec-mocks (~> 3.10)
      rspec-support (~> 3.10)
    rspec-sidekiq (3.1.0)
      rspec-core (~> 3.0, >= 3.0.0)
      sidekiq (>= 2.4.0)
    rspec-support (3.11.0)
    rspec_api_documentation (6.1.0)
      activesupport (>= 3.0.0)
      mustache (~> 1.0, >= 0.99.4)
      rspec (~> 3.0)
    ruby-graphviz (1.2.5)
      rexml
    ruby2_keywords (0.0.5)
    shoulda-matchers (5.1.0)
      activesupport (>= 5.2.0)
    sidekiq (6.5.4)
      connection_pool (>= 2.2.2)
      rack (~> 2.0)
      redis (>= 4.5.0)
    sidekiq-unique-jobs (7.1.27)
      brpoplpush-redis_script (> 0.1.1, <= 2.0.0)
      concurrent-ruby (~> 1.0, >= 1.0.5)
      sidekiq (>= 5.0, < 8.0)
      thor (>= 0.20, < 3.0)
    simplecov (0.21.2)
      docile (~> 1.1)
      simplecov-html (~> 0.11)
      simplecov_json_formatter (~> 0.1)
    simplecov-html (0.12.3)
    simplecov_json_formatter (0.1.4)
    spring (2.1.1)
    spring-commands-rspec (1.0.4)
      spring (>= 0.9.1)
    spring-watcher-listen (2.0.1)
      listen (>= 2.7, < 4.0)
      spring (>= 1.2, < 3.0)
    sprockets (4.1.1)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.4.2)
      actionpack (>= 5.2)
      activesupport (>= 5.2)
      sprockets (>= 3.0.0)
    squasher (0.6.2)
    thor (1.2.1)
    tzinfo (2.0.5)
      concurrent-ruby (~> 1.0)
    tzinfo-data (1.2022.3)
      tzinfo (>= 1.0.0)
    unf (0.1.4)
      unf_ext
    unf_ext (0.0.8.2)
    unicorn (6.1.0)
      kgio (~> 2.6)
      raindrops (~> 0.7)
    warden (1.2.9)
      rack (>= 2.0.9)
    web-console (4.2.0)
      actionview (>= 6.0.0)
      activemodel (>= 6.0.0)
      bindex (>= 0.4.0)
      railties (>= 6.0.0)
    webmock (3.18.1)
      addressable (>= 2.8.0)
      crack (>= 0.3.2)
      hashdiff (>= 0.4.0, < 2.0.0)
    webrick (1.7.0)
    websocket-driver (0.7.5)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.5)
    yt (0.33.4)
      activesupport
    zeitwerk (2.6.0)

PLATFORMS
  aarch64-linux-musl

DEPENDENCIES
  aasm
  active_record-acts_as
  activerecord-import
  activerecord-postgis-adapter
  api-pagination
  bcrypt (~> 3.1.7)
  blueprinter
  bootsnap (>= 1.1.0)
  browser
  byebug
  cancancan
  database_cleaner
  devise
  elastic-apm
  elasticsearch
  elasticsearch-model
  factory_bot_rails
  faker
  foreman
  geocoder
  groupdate
  jbuilder (~> 2.5)
  json_matchers
  jwt
  listen
  lograge
  logstash-event
  logstash-logger
  pagy
  paper_trail
  parallel
  patron
  pg (>= 0.18, < 2.0)
  prometheus_exporter
  puma (~> 4.3)
  rack-cors
  rack-utf8_sanitizer
  rails (~> 6.1)
  rails-erd
  rspec-rails (~> 5.0)
  rspec-sidekiq
  rspec_api_documentation
  shoulda-matchers
  sidekiq
  sidekiq-unique-jobs (>= 7.0.4)
  simplecov
  spring
  spring-commands-rspec
  spring-watcher-listen (~> 2.0.0)
  squasher
  tzinfo-data
  unicorn
  web-console
  webmock
  yt

RUBY VERSION
   ruby 3.0.4p208

BUNDLED WITH
   2.3.20
</pre>
</details>
@deivid-rodriguez
Copy link
Member

Thank you, I will try to reproduce this.

@deivid-rodriguez
Copy link
Member

Does it work if you upgrade Rubygems with gem update --system?

@deivid-rodriguez
Copy link
Member

I can reproduce this on alpine, I'll try to figure it out, thanks for reporting so fast.

@slhck
Copy link
Author

slhck commented Aug 24, 2022

Thanks for confirming! I was suspecting a platform issue. CI caught these issues fast enough :) (But I'll learn to freeze all the things now.)

@loveo
Copy link

loveo commented Aug 24, 2022

Having the same issue (and fix) running bundler in ruby:3.0.1-alpine Docker image.

@deivid-rodriguez
Copy link
Member

That's too bad. It seems to have been caused by #4488. I'll try hard to fix this so that we don't have to revert this (again).

@deivid-rodriguez deivid-rodriguez changed the title Bundler hangs at resolving dependencies Bundler hangs at resolving dependencies on Alpine Aug 25, 2022
@deivid-rodriguez
Copy link
Member

#5875 should fix this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants