-
Notifications
You must be signed in to change notification settings - Fork 63
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
Prefix ems_ref with object type in event hash #123
Conversation
The event handler expects the ems_ref to be prefixed by the object type, not using the raw ems_ref. This is causing issues adding a real ems_ref for an event because the process_container_entities_in_event! method is clearing the key.
Use the class name as a prefix for ems_ref removing a collision with the real ems_ref column Depends on ManageIQ/manageiq-providers-kubernetes#123 Fixes ManageIQ#16074
Checked commit agrare@f706759 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
Use the class name as a prefix for ems_ref removing a collision with the real ems_ref column Depends on ManageIQ/manageiq-providers-kubernetes#123 Fixes ManageIQ#16074
@@ -4,7 +4,16 @@ module ManageIQ::Providers::Kubernetes::ContainerManager::EventParserMixin | |||
included do | |||
def self.event_to_hash(event, ems_id = nil) | |||
_log.debug("ems_id: [#{ems_id}] event: [#{event.inspect}]") | |||
{ | |||
ems_ref_key = case event[:kind] |
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.
Consider moving this above line 30
@agrare The fix makes sense. What I don't get is what Is a real ems_ref? Do we have a bug or issue for this or is it for something under development? |
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
IIUC this better be merged simultaneously with ManageIQ/manageiq#16076 |
The event handler expects the ems_ref to be prefixed by the object type,
not using the raw ems_ref. This is causing issues adding a real ems_ref
for an event because the process_container_entities_in_event! method is
clearing the key.