-
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
Fix allowed_vlans to call preload correctly. #16702
Conversation
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.
👍 this now matches the dvs method we have in the vwmare repo
hosts = [@host1] | ||
MiqPreloader.preload(hosts, :lans => :switches) | ||
expect(ActiveRecord::Base.connection).not_to receive(:exec_query) | ||
workflow.load_hosts_vlans(hosts, {}) |
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.
This test doesn't make sense. All the test is showing is that ActiveRecord works correctly. A better test would be to use the query counting helper.
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.
See https://github.com/ManageIQ/manageiq/blob/master/spec/support/custom_matchers/exceed_query_limit.rb and https://github.com/ManageIQ/manageiq/blob/master/spec/support/custom_matchers/match_query_limit_of.rb custom matches for how to do query limit checks.
7844a4c
to
9c94f30
Compare
Checked commit lfu@9c94f30 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Fix allowed_vlans to call preload correctly. (cherry picked from commit 09a566a) https://bugzilla.redhat.com/show_bug.cgi?id=1530674
Gaprindashvili backport details:
|
Fix allowed_vlans to call preload correctly. (cherry picked from commit 09a566a) https://bugzilla.redhat.com/show_bug.cgi?id=1565248
Fine backport details:
|
Fix allowed_vlans to call preload correctly. (cherry picked from commit 09a566a) https://bugzilla.redhat.com/show_bug.cgi?id=1565248
The existing preload association option is not specified correctly.
https://bugzilla.redhat.com/show_bug.cgi?id=1510069
@miq-bot assign @gmcculloug
@miq-bot add_label bug, provisioning, fine/yes, gaprindashvili/yes
cc @agrare
To verify the N+1 queries in Rails console.
With existing preload association option.
With modified preload association.