stripe-contrib / pagerbot

Manage Pagerduty on-call schedules from within your internal chat channels.
https://stripe.com/blog/pagerbot
MIT License
277 stars 90 forks source link

Upgrade to Ruby 2.5.1 Support, avoid seg faults from old activesupport package. #67

Open zerkz opened 6 years ago

zerkz commented 6 years ago

I had issues deploying this on a heroku-18 stack with the version of ruby defined. Segfaults were occurring from a 4.0.3 activesupport dependency, supplied by the ruby package system when using the defined ruby versions (2.2? 2.3?).

This pull request upgrades everything to 2.5.1 ruby, including all of its dependencies.

Tests pass after rebuilding the dockerimage (updated to extend from RUBY:2.5)

Let me know if there's a better way of defining these version restrictions. It's possible it might work with 2.4 well, but I haven't had the time to try. The ruby buildpack does not support Ruby 2.3 running on the latest stack (heroku-18).

zerkz commented 6 years ago

@macobo @nelhage @nelhage-stripe Are any of yall active maintainers or know someone you could point me to, to take a look at this PR?

Thanks!

glasser commented 5 years ago

FYI this is probably better than not having it, but even with this I can't get it to run due to probably a too-old version of activesupport. I am getting stuff like

2019-01-25T18:20:33.879654+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/activesupport-4.0.13/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>': stack level too deep (SystemStackError)
2019-01-25T18:20:33.879659+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-4.0.13/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
2019-01-25T18:20:33.879663+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-4.0.13/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
2019-01-25T18:20:33.879665+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-4.0.13/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
2019-01-25T18:20:33.879669+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.5.0/gems/activesupport-4.0.13/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'

Looks like https://stackoverflow.com/questions/41504106/ruby-2-4-and-rails-4-stack-level-too-deep-systemstackerror etc

Gonna try to figure out how to stick to heroku-16!

glasser commented 5 years ago

Hmm, looks like Ruby prior to 2.4 isn't supported by Heroku (https://devcenter.heroku.com/articles/ruby-support#ruby-versions) so sticking with old stuff isn't going to work. Somebody who understands Ruby/Rails more than me is going to have to upgrade activesupport/rails appropriately...

zerkz commented 5 years ago

@glasser I have pagerbot running on heroku-18 (with ruby build pack) using the contents of this PR. Are you unable to use heroku-18?

glasser commented 5 years ago

It didn't work for me (with a brand new app from scratch). I get infinite recursion stack traces like above. Are you able to do a from-scratch deploy to heroku?