-
Notifications
You must be signed in to change notification settings - Fork 3
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
Rails smoke test during release phase? #1120
Comments
Right now rails runner not being able to execute is treated as "we couldn't get enough information" to know what to do. But I do think it's a good indicator of a problem if the command fails that the app won't be able to boot. I think rolling this out as default behavior is tricky though. It would be easy to scope it to new apps. We could also have an opt-in and an opt-out flag based on an env var. I'm generally in favor of adding this as a feature of the buildpack, but rollout of any default behavior will be slow and needs to be deliberate. |
How would this work 🤔 Is there an easy way to determine whether an application is new or not?
I think this makes a lot of sense, might cause some surprises if this is initially released as globally opt-in. Not sure under which circumstance a test like this could throw false-positives, but I know I would be frustrated if deploys started to fail 'randomly' due to buildpack changes. Would the idea be that it is initially opt-in and then over time/depending on adoption switch to opt-out?
Yay! 😄 What would be the next steps to move this forward? Some other questions/thoughts that have come to mind: Is there already an established convention for opting in/out of features on this buildpack? (I guess this is also implicitly asking: what is a good name for this feature? 😄) What is a good 'test' to establish that an application will boot successfully? (Is running Should there be scope for application owners to modify/customise that test? If so, how? Perhaps by redefining a rake task ( |
We've got that baked in. Check out
Exactly. We would start with new apps only and letting people opt-in. Then if it goes okay. I can wire the buildpack up to give me metrics of how often this tasks fails, to give me an idea about the potential impact of turning it on by default.
Usually env vars that start with
People can already provide their own release phase, this is in addition to that. |
Adds "RailsBootcheck" to the Rails buildpack. RailsBootcheck attempts to load your rails application and will fail the the build of your application if it is unable to load. This can help prevent scenarios where you can accidentally ship a version of your application that cannot boot properly. Which will lead to errors as the application is released and traffic is routed to it. You can opt-in to this feature via the `HEROKU_RAILS_BOOTCHECK_ENABLE` variable, new rails applications will have this variable set by default. You can opt-out of this feature via the `HEROKU_RAILS_BOOTCHECK_DISABLE` variable. Closes #1120
Hi, the buildpack currently does some fingerprinting to notice whether the ruby app being deployed is a rails app by attempting to run
rails runner
.If the application is a rails application but for some reason can't be loaded properly (maybe some configuration differences between CI and production) this test will fail but the release will still succeed.
We've adding a rake task to all of our applications as part of the
release
task in our Procfile that does runsrails runner
and if there is a failure returns the non-zero exit code causing the release to fail and therefore does not actually release the applications.This can catch some awkward issues that can slip through dev and CI and cause apps to deploy but not be able to actually process any requests!
Is this something that could be useful to be included in this buildpack?
Maybe only added if there is an explicit ENV var that denotes that the applications is expected to be running rails?
The text was updated successfully, but these errors were encountered: