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

Pointing orangetheses to main breaks bibdata #2282

Closed
christinach opened this issue Dec 15, 2023 · 5 comments
Closed

Pointing orangetheses to main breaks bibdata #2282

christinach opened this issue Dec 15, 2023 · 5 comments
Assignees
Labels
maintenance Ticket related to maintenance that needs to be done

Comments

@christinach
Copy link
Member

christinach commented Dec 15, 2023

Merging this Pull request broke bibdata.
This was obvious after deploying to production.
CI didn't fail.

@christinach christinach added the maintenance Ticket related to maintenance that needs to be done label Dec 15, 2023
@sandbergja
Copy link
Member

I think this is because #2277 added stringio to the Gemfile.lock, which passenger doesn't like. pulibrary/princeton_ansible#4498 would likely fix that issue.

I saw the following in the nginx logs from datadog:

Error: The application encountered the following error: You have already activated stringio 3.0.1, but your Gemfile requires stringio 3.1.0. Since stringio is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports stringio as a default gem. (Gem::LoadError)

@kevinreiss
Copy link
Member

kevinreiss commented Dec 19, 2023

Discussed on 12/19. Will check back in January to collaborate on the fix from pulibrary/princeton_ansible#4498

@kevinreiss
Copy link
Member

Princeton Ansible 4498 has been merged. We can try this again in staging.

@sandbergja
Copy link
Member

Adding passenger_preload_bundler on; to the passenger nginx config changed the error that we got in the nginx logs, from:

App 230012 output: Error: The application encountered the following error: You have already activated stringio 3.0.1, but your Gemfile requires stringio 3.1.0. Since stringio is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports stringio as a default gem. (Gem::LoadError)
App 230012 output:     /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/runtime.rb:308:in `check_for_activated_spec!'
App 230012 output:     /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/runtime.rb:25:in `block in setup'
App 230012 output:     /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/spec_set.rb:155:in `each'
App 230012 output:     /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/spec_set.rb:155:in `each'
App 230012 output:     /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/runtime.rb:24:in `map'
App 230012 output:     /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/runtime.rb:24:in `setup'
App 230012 output:     /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler.rb:161:in `setup'
App 230012 output:     /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/setup.rb:20:in `block in <top (required)>'
App 230012 output:     /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/ui/shell.rb:136:in `with_level'
App 230012 output:     /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/ui/shell.rb:88:in `silence'
App 230012 output:     /usr/local/lib/ruby/gems/3.1.0/gems/bundler-2.3.25/lib/bundler/setup.rb:20:in `<top (required)>'
App 230012 output:     <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
App 230012 output:     <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
App 230012 output:     /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:380:in `activate_gem'
App 230012 output:     /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:221:in `block in run_load_path_setup_code'
App 230012 output:     /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:544:in `running_bundler'
App 230012 output:     /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:220:in `run_load_path_setup_code'
App 230012 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:91:in `preload_app'
App 230012 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
App 230012 output:     /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:397:in `run_block_and_record_step_progress'
App 230012 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:188:in `<module:App>'
App 230012 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
App 230012 output:     /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'

to:

App 231086 output: /usr/local/lib/ruby/site_ruby/3.1.0/rubygems.rb:259:in `find_spec_for_exe'
App 231086 output: :
App 231086 output: can't find gem bundler (= 2.5.4) with executable bundle
App 231086 output:  (
App 231086 output: Gem::GemNotFoundException
App 231086 output: )
App 231086 output:
App 231086 output:      from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems.rb:239:in `bin_path'
App 231086 output:      from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/rubygems_integration.rb:151:in `bin_path'
App 231086 output:      from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/shared_helpers.rb:321:in `bundle_bin_path'
App 231086 output:      from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/shared_helpers.rb:307:in `set_bundle_variables'
App 231086 output:      from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/shared_helpers.rb:76:in `set_bundle_environment'
App 231086 output:      from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/runtime.rb:20:in `setup'
App 231086 output:      from /usr/local/lib/ruby/site_ruby/3.1.0/bundler.rb:162:in `setup'
App 231086 output:      from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/setup.rb:26:in `block in <top (required)>'
App 231086 output:      from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/ui/shell.rb:159:in `with_level'
App 231086 output:      from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/ui/shell.rb:111:in `silence'
App 231086 output:      from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/setup.rb:26:in `<top (required)>'
App 231086 output:      from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
App 231086 output:      from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
[ E 2024-01-12 13:20:51.4231 230079/T2x age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /opt/bibdata/current: The application process exited prematurely.

@maxkadel
Copy link
Contributor

maxkadel commented Apr 4, 2024

PR is now safe to merge and deploy - #2298 - had to both upgrade rubygems and set default bundler, then preload passenger. See also pulibrary/princeton_ansible#4814

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Ticket related to maintenance that needs to be done
Projects
None yet
Development

No branches or pull requests

4 participants