-
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
Remove storage references to multiple emses #19754
Conversation
app/models/storage.rb
Outdated
|
||
def ext_management_systems_with_authentication_status_ok_in_zone(zone_name) | ||
ext_management_systems_with_authentication_status_ok.select { |ems| ems.my_zone == zone_name } | ||
[ext_management_system] |
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.
Maybe .compact
to handle the case of an archived storage
app/models/storage.rb
Outdated
ems = emss.detect { |e| smartstate_analysis_count_for_ems_id(e.id) < ::Settings.storage.max_parallel_scans_per_ems } | ||
if ems.nil? | ||
ems = ext_management_system | ||
unless smartstate_analysis_count_for_ems_id(e.id) < ::Settings.storage.max_parallel_scans_per_ems |
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.
was this supposed to be ems.id
or is e
defined somewhere else?
Looks good @kbrock, few comments and the specs are failing |
Storage now uses ems_id instead of host_storages for ems references ManageIQ#19617 This further makes that change
8dc30be
to
ab68c94
Compare
Checked commit kbrock@ab68c94 with ruby 2.5.5, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.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.
👍 LGTM!
Fixing ui specs in ManageIQ/manageiq-ui-classic#6662,
that's dead as well, right? |
@himdel we left |
Clean up technical debt in the storage to ems link.
There is a bit of cruft in the code to support a storage belonging to multiple emses. These optimizations were introduced to fix some performance issues with refresh.
Now that
Storage
has a single ems (viaems_id
) instead of going throught thehost_storages
reference, these optimizations can be removed.The PR that moved towards
ems_id
-- #19617