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

Remove require_nested :Runner from NetworkManager::EventCatcher and NetworkManager::MetricsCollectorWorker #173

Conversation

NickLaMuro
Copy link
Member

Purpose

Avoid issues in development mode when eager loading, since this doesn't work.

Background

As part of ManageIQ/manageiq#14261 I am trying to get eager_loading fuctioning properly with manageiq. When doing eager loading in development mode, things bust because require_nested on these two models is invalid because there isn't a corresponding nested directory available for these two models.

Not sure the status of these models, because they aren't included in the main NetworkManager in this provider, so they might be incomplete or not used. Only eager loading without cached classes seems to cause this error to, so I will let the reviewer be the judge of whether this fix is sufficient, or we should consider removing these models entirely.

Links

Both the Amazon::NetworkManager::EventCatcher and
Amazon::NetworkManager::MetricsCollectorWorker don't have corresponding
nested event_catcher/runner.rb and metrics_collector_worker/runner.rb
directories respectively, thus `require_nested` fails.

The reason this doesn't seem to be a problem is we don't eager load in
manageiq, and it is possible that these two classes are currently not in
use.
@miq-bot
Copy link
Member

miq-bot commented Mar 11, 2017

Checked commit NickLaMuro@991b550 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks good. 🍰

@Ladas
Copy link
Contributor

Ladas commented Mar 13, 2017

good catch, seems to me that this fix is sufficient 👍

@Ladas Ladas self-assigned this Mar 13, 2017
@Ladas Ladas added this to the Sprint 56 Ending Mar 13, 2017 milestone Mar 13, 2017
@Ladas Ladas merged commit 93b22f1 into ManageIQ:master Mar 13, 2017
@Ladas
Copy link
Contributor

Ladas commented Mar 13, 2017

@NickLaMuro this doesn't need to go to Euwe, right?

@NickLaMuro
Copy link
Member Author

@Ladas Depends on a few things, both of which I am unsure about:

  1. Not sure how much of this code exists in Euwe (I can check)
  2. Don't know how far I will be taking [WIP] Adds lib/miq_benchmark to benchmark per PR manageiq#14261, but the plan with it was to run it on multiple branches to view trends. That said, we can just start with fine if that is simpler.

We can leave it euwe/no for now, and can change it at a later date depending on the above.

@NickLaMuro
Copy link
Member Author

Also, thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants