-
Notifications
You must be signed in to change notification settings - Fork 900
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 the ems_custom_attributes inventory collection #21623
Fix the ems_custom_attributes inventory collection #21623
Conversation
This had a manager_ref of just `:name` but these belong to a polymorphic resource and just the name is not unique. Adding the `:resource` to the manager_ref array makes this unique.
:manager_ref => %i(name), | ||
:parent_inventory_collections => %i(vms) | ||
:manager_ref => %i(resource name), | ||
:parent_inventory_collections => %i(vms miq_templates) |
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 collection (vm_and_template_ems_custom_fields) is used by ovirt and exhibits the same bug, I am going to follow-up with a refactoring to get them both onto the same inventory_collection but want to keep this clean of refactorings for backport
@miq-bot cross-repo-tests ManageIQ/manageiq-providers-vmware#771, manageiq-providers-ovirt |
From Pull Request: ManageIQ/manageiq#21623
Checked commit agrare@128cef6 with ruby 2.6.3, rubocop 1.13.0, haml-lint 0.35.0, and yamllint app/models/manageiq/providers/inventory/persister/builder/infra_manager.rb
|
From Pull Request: ManageIQ/manageiq#21623
@Fryguy PTAL cross repo is green |
Backported to
|
…tory_collection Fix the ems_custom_attributes inventory collection (cherry picked from commit 72021d9)
Backported to
|
…tory_collection Fix the ems_custom_attributes inventory collection (cherry picked from commit 72021d9)
This had a manager_ref of just
:name
but these belong to a polymorphic resource and just the name is not unique.Adding the
:resource
to the manager_ref array makes this unique.Spec test showing the failure: ManageIQ/manageiq-providers-vmware#771
Fixes ManageIQ/manageiq-providers-vmware#727