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

Ruby version installation errors and warnings #953

Merged

Conversation

schneems
Copy link
Contributor

Currently when a customer tries to upgrade their stack and are using an old version of Ruby they get a very unhelpful error:

       Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-18/ruby-1.9.3.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3.
       Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-18/ruby-1.9.3.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
 !
 !     An error occurred while installing ruby-1.9.3
 !
 !     Heroku recommends you use the latest supported Ruby version listed here:
 !     https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
 !
 !     For more information on syntax for declaring a Ruby version see:
 !     https://devcenter.heroku.com/articles/ruby-versions
 !
 !
 !     Debug InformationCommand: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-18/ruby-1.9.3.tgz -s -o - | tar zxf - ' failed unexpectedly:
 !
 !     gzip: stdin: unexpected end of file
 !     tar: Child returned status 1
 !     tar: Error is not recoverable: exiting now
 !
 !     Push rejected, failed to compile Ruby app.
 !     Push failed

This is awful and gives no context. The goal of this PR is to do a few things:

  • If a Ruby version does not exist on any stack, explicitly state the problem
  • If a Ruby version exists, but not on your current stack, list the stacks it is present on
  • If a Ruby version exists, but not for the next stack (i.e. heroku-16 if you're deploying to cedar-14) then the customer should get a warning

@schneems schneems force-pushed the schneems/better-stack-upgrade-missing-binary-message branch 2 times, most recently from df5177b to 643d408 Compare February 26, 2020 22:14
lib/language_pack/ruby.rb Outdated Show resolved Hide resolved
@schneems schneems force-pushed the schneems/better-stack-upgrade-missing-binary-message branch from 643d408 to 100cff2 Compare March 2, 2020 17:19
schneems added 2 commits March 2, 2020 11:29
Currently when a customer tries to upgrade their stack and are using an old version of Ruby they get a very unhelpful error:

```
       Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-18/ruby-1.9.3.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3.
       Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-18/ruby-1.9.3.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
 !
 !     An error occurred while installing ruby-1.9.3
 !
 !     Heroku recommends you use the latest supported Ruby version listed here:
 !     https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
 !
 !     For more information on syntax for declaring a Ruby version see:
 !     https://devcenter.heroku.com/articles/ruby-versions
 !
 !
 !     Debug InformationCommand: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-18/ruby-1.9.3.tgz -s -o - | tar zxf - ' failed unexpectedly:
 !
 !     gzip: stdin: unexpected end of file
 !     tar: Child returned status 1
 !     tar: Error is not recoverable: exiting now
 !
 !     Push rejected, failed to compile Ruby app.
 !     Push failed
 ```

 This is awful and gives no context. The goal of this PR is to do a few things:

 - If a Ruby version does not exist on any stack, explicitly state the problem
 - If a Ruby version exists, but not on your current stack, list the stacks it is present on
 - If a Ruby version exists, but not for the next stack (i.e. heroku-16 if you're deploying to cedar-14) then the customer should get a warning
@schneems schneems force-pushed the schneems/better-stack-upgrade-missing-binary-message branch from 100cff2 to 24c1e40 Compare March 2, 2020 17:29
Copy link
Member

@edmorley edmorley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

@schneems schneems merged commit f3f310e into master Mar 3, 2020
@schneems schneems deleted the schneems/better-stack-upgrade-missing-binary-message branch March 3, 2020 18:19
@schneems
Copy link
Contributor Author

schneems commented Mar 3, 2020

Thanks for the review

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

Successfully merging this pull request may close these issues.

2 participants