-
Notifications
You must be signed in to change notification settings - Fork 898
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
Pluggable provider mapping prefixes and targets #20776
Pluggable provider mapping prefixes and targets #20776
Conversation
app/models/ext_management_system.rb
Outdated
supported_subclasses.select(&:supported_for_label_mapping?) | ||
end | ||
|
||
def self.supported_label_mapping_prefixes |
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.
Unless we're going to have an unsupported_label_mapping_prefixes
we can probably just call this self.label_mapping_prefixes
or all_label_mapping_prefixes
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.
Done 👍
@lpichler should we include |
@lpichler for the categories it looks like you might need more info than just the class names? |
c984ffb
to
c9f1679
Compare
No.
Yes, you are right we need it for @agrare you can re-review it, |
From Pull Request: ManageIQ/manageiq#20776
From Pull Request: ManageIQ/manageiq#20776
From Pull Request: ManageIQ/manageiq#20776
From Pull Request: ManageIQ/manageiq#20776
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.
Looks good to me, cross repo is green, thanks @lpichler !
From Pull Request: ManageIQ/manageiq#20776
From Pull Request: ManageIQ/manageiq#20776
From Pull Request: ManageIQ/manageiq#20776
From Pull Request: ManageIQ/manageiq#20776
I am not sure what I am doing wrong for cross testing miq bot command: @miq-bot cross-repo-tests https://github.com/ManageIQ/manageiq-providers-amazon/pull/669,https://github.com/ManageIQ/manageiq-providers-azure/pull/424,https://github.com/ManageIQ/manageiq-providers-ibm_cloud/pull/116,https://github.com/ManageIQ/manageiq-providers-kubernetes/pull/409,https://github.com/ManageIQ/manageiq-providers-openstack/pull/665,https://github.com/ManageIQ/manageiq-providers-vmware/pull/669 including https://github.com/ManageIQ/manageiq-providers-amazon/pull/669 https://github.com/ManageIQ/manageiq-providers-azure/pull/424 https://github.com/ManageIQ/manageiq-providers-ibm_cloud/pull/116 https://github.com/ManageIQ/manageiq-providers-kubernetes/pull/409 https://github.com/ManageIQ/manageiq-providers-openstack/pull/665 https://github.com/ManageIQ/manageiq-providers-vmware/pull/669 https://github.com/ManageIQ/manageiq-schema/pull/525 https://github.com/ManageIQ/manageiq/pull/20776 |
From Pull Request: ManageIQ/manageiq#20776
@miq-bot cross-repo-tests manageiq-ui-classic, manageiq-api, ManageIQ/manageiq-providers-amazon#669, ManageIQ/manageiq-providers-azure#424, ManageIQ/manageiq-providers-ibm_cloud#116, ManageIQ/manageiq-providers-kubernetes#409, ManageIQ/manageiq-providers-openstack#665, ManageIQ/manageiq-providers-vmware#669 including ManageIQ/manageiq-providers-amazon#669 |
Just going to do one more cross-repo test with the UI and API included |
From Pull Request: ManageIQ/manageiq#20776
Currently only failing on an unrelated UI error |
From Pull Request: ManageIQ/manageiq#20776
|
||
def self.entities_for_label_mapping | ||
label_mapping_classes.reduce({}) { |all_mappings, klass| all_mappings.merge(klass.entities_for_label_mapping) } | ||
end |
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.
Please mark any of the above as private if they are not to be used as public API of the class.
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.
Can you also add specs for these methods?
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.
I added specs but we need public API, at least for now for UI.
c9f1679
to
edf3531
Compare
edf3531
to
a011707
Compare
From Pull Request: ManageIQ/manageiq#20776
@lpichler you need to rebase this PR on master to fix that k8s test |
a011707
to
3a7f053
Compare
From Pull Request: ManageIQ/manageiq#20776
From Pull Request: ManageIQ/manageiq#20776
✅✅✅ All checks have passed in ManageIQ/manageiq-cross_repo-tests#235 ✅✅✅ |
}.freeze | ||
|
||
it "supports label mapping for provider subclasses" do | ||
expect(SUPPORTED_MAPPING_ENTITIES).to eq(ExtManagementSystem.entities_for_label_mapping) |
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.
Sorry @lpichler (just noticed you added this) but can you update this to check .includes
on one or two values instead of .eq
on the whole list? I don't want to get back into having the same problems as we fixed in #20595 aka everytime we add another one core specs start failing.
You don't need to rerun the whole cross repo tests again though :)
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.
Sorry @lpichler (just noticed you added this) but can you update this to check
.includes
on one or two values instead of.eq
on the whole list? I don't want to get back into having the same problems as we fixed in #20595 aka everytime we add another one core specs start failing.
Done 👍
You don't need to rerun the whole cross repo tests again though :)
👍 :)
thanks @agrare
3a7f053
to
a173322
Compare
Checked commit lpichler@a173322 with ruby 2.6.3, rubocop 0.82.0, haml-lint 0.35.0, and yamllint |
Fixes and adds supporting method to solve 2 points from #19440:
1. is fixed in this PR and 2. will be fixed in UI PR
Supported in providers:
Links