-
-
Notifications
You must be signed in to change notification settings - Fork 719
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
Setup script tweaks #11365
Setup script tweaks #11365
Conversation
bundle install always shows a very long list of all gems. But we really only want to know about the new gems being installed. Thankfully there's an option for that.
The log:clear task seems to take quite a bit of time. At least we can speed up a bit by only booting up Rails once. I'm more likely to run the script if it's quick ;)
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.
Great, thank you!
puts "\n== Preparing database ==" | ||
system! "bin/rails db:prepare" | ||
|
||
puts "\n== Removing old logs and tempfiles ==" | ||
system! "bin/rails log:clear tmp:clear" | ||
puts "\n== Preparing database, removing old logs and tempfiles ==" | ||
system! "bin/rails db:prepare log:clear tmp:clear" |
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.
I would have expected Spring to skip the boot time but I did observe this slowness as well. I wonder why...
@@ -4,6 +4,8 @@ require "fileutils" | |||
# path to your application root. | |||
APP_ROOT = File.expand_path("..", __dir__) | |||
|
|||
BUNDLE_ENV = { "BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES"=> "true" } |
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.
BUNDLE_ENV = { "BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES"=> "true" } | |
BUNDLE_ENV = { "BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES" => "true" } |
Works on my machine! Test passed. I think I hesitated changing these things in the past because whenever we update Rails it may suggest a newer version of this script. And the more changes there are to the original, the more we have to review to see if the new version has any improvements compared to our version. But rails upgrades are quite rare... |
Oh yeah, I forgot about that. For the small benefit it may not be worth the extra maintenance. |
Oh nice! Thanks! |
What? Why?
Reduces unnecessary Bundler output, and speeds up the script.
BTW This handy script can be run at any time to prepare your environment after pulling the latest changes on master, including gems, node packages and database migrations.
What should we test?
If you have already installed the latest gems today, you can first remove one to test that it gets installed again. Eg:
Release notes
Changelog Category: Technical changes
The title of the pull request will be included in the release notes.