-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Better failure message for CI apps using default stack #809
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -380,6 +380,41 @@ def install_ruby | |
|
||
true | ||
rescue LanguagePack::Fetcher::FetchError => error | ||
if stack == "heroku-18" && ruby_version.version_for_download.match?(/ruby-2\.(2|3)/) | ||
message = <<ERROR | ||
An error occurred while installing #{ruby_version.version_for_download} | ||
|
||
This version of Ruby is not available on Heroku 18. The minimum supported version | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Heroku-18" |
||
of Ruby on the Heroku 18 stack can found at: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Heroku-18" |
||
|
||
https://devcenter.heroku.com/articles/ruby-support#supported-runtimes | ||
|
||
ERROR | ||
|
||
ci_message = <<ERROR | ||
|
||
If you did not intend to build your app for CI on the Heroku 18 stack | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Heroku-18" |
||
please set your stack version manually in the `app.json`: | ||
|
||
``` | ||
"stack": "heroku-16" | ||
``` | ||
|
||
More information about this change in behavior can be found at: | ||
https://kb.heroku.com/3Y1HEXGJ/why-doesn-t-ruby-2-3-7-work-in-my-ci-tests | ||
|
||
ERROR | ||
|
||
if env("CI") | ||
mcount "fail.bad_version_fetch.heroku-18.ci" | ||
message << ci_message | ||
else | ||
mcount "fail.bad_version_fetch.heroku-18" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe instead of this add a generic There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The way we're measuring failures doesn't like reporting the same failure twice under the same key i.e. |
||
end | ||
|
||
error message | ||
end | ||
|
||
mcount "fail.bad_version_fetch" | ||
mcount "fail.bad_version_fetch.#{ruby_version.version_for_download}" | ||
message = <<ERROR | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
|
||
module LanguagePack | ||
class LanguagePack::Base | ||
BUILDPACK_VERSION = "v191" | ||
BUILDPACK_VERSION = "v192" | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Heroku-18"