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

Mission Control seems to require an active record connection when the application typically does not #162

Open
Senjai opened this issue Sep 17, 2024 · 0 comments

Comments

@Senjai
Copy link

Senjai commented Sep 17, 2024

On version 0.3.1, we had to recently set mission control rails to require: false, and manually require the gem in non CI environments.

Something about the way this gem loads, will attempt to invoke ActiveRecord::Base.connection on load. My hypothesis is it's something to do with https://github.com/rails/mission_control-jobs/blob/main/lib/mission_control/jobs.rb#L6

We tested this by commenting out all mount's and application configuration (e.g. no references in config/application.rb, routes, and more) before setting the gem to require: false in the Gemfile.

This is a problem because our build environment does not have a database connection set up. E.g. when running bundle exec rails assets:precompile but does in our other environments (production, development etc). I haven't yet had time to track this down further.

Ideally, Mission Control does not invoke side effects in Active Record on load, instead only doing so when the route is visited or otherwise.

Very excited about this project by the way. If necessary, I could look to setting up a proof of concept to demo the problem.

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

No branches or pull requests

1 participant