-
Notifications
You must be signed in to change notification settings - Fork 897
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
Use ruby not runner for run single worker #15825
Use ruby not runner for run single worker #15825
Conversation
It is the biggest bundler group in terms of loading time, memory, code, and it's not needed by all non ui worker processes. Note, we need to set ENV["BUNDLER_GROUPS"] by default in application.rb so all non worker rails processes (console, runner, etc.) will include all gemsets by default.
It's the easiest gemset to exclude by default and provides the most benefits to non-ui workers.
This allows us to take advantage of bundler_groups.
Checked commits jrafanie/manageiq@c57b0b7~...cb63b4b with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
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.
tl; dr; 👍
I like this approach, and much prefer it to my "fix the two things that were bothering me at the time" PR, #15821
While I this will bloat what we have a bit, it won't be so bad because we autoload everything (for better or worse). I think the stability benefits we gain from this and actually launching things in foreman the way I had intended (and doing this before this becomes a heavily used standard for developers) far out way the loss memory locally for now.
That said, we should get a plan in place to start tackling striping this down, but that can be done later.
@carbonin @gtanzillo When you have time, I think me and Joe have agreed that this is the path we would like to start on for a reset on getting the bundler groups working properly, and having this in place is needed for that. To avoid a 📖 , I will leave it at that, but let me know if there is anything that is confusing about this approach. |
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.
Looks good
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.
Looks good to me 👍
This is another version of #15821
Basically:
ruby
notbundle exec rails runner
This is a way to dial back the aggressive "minimal" gemset selection for best benefits with much less risk.
We can continue to try to find solutions to the problems described here and try to whittle away/decouple the dependencies.
The concern is any worker could try to constantize a constant in a gemset such as below. We need a better story for how to deal with that.