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
Save inventory container: remove target option #15182
Conversation
|
@miq-bot add_label providers/containers, bug |
|
cc @cben @moolitayer |
|
We didn't do really good testing when introduced this broken code several stable releases ago ;-) Current tests I'm aware of check only:
Don't have but ought to:
Had some discussions with @zakiva, with some ideas how to reproducibly record more complex scenarios. |
|
Would love to see this unused code go away |
|
@cben @moolitayer can you test/review/approve? |
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.
@zakiva are the tests ManageIQ/manageiq-providers-openshift#18 close to ready? Can I help?
I'm confident in this to 👍 merging before the tests (and you have been testing this a lot), but I think it's good procedure to have tests before backporting.
Yes, added also the k8s tests in ManageIQ/manageiq-providers-kubernetes#44 both pending review/merge |
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.
kubernetes tests merged, ManageIQ/manageiq-providers-openshift#18 is only pending on this PR, right?
| @@ -1,6 +1,5 @@ | |||
| module EmsRefresh::SaveInventoryContainer | |||
| def save_ems_container_inventory(ems, hashes, target = nil) | |||
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.
_target
@cben yes |
|
Checked commit zakiva@c2ce88f with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.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 👍
Hurry for removing unused code!
|
@simon3z please review |
|
@miq-bot add_label fine/yes |
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 👍
cc @chrispy1
|
Overall this looks OK to me, but I've asked @agrare to be the merger on it to make sure I didn't miss anything. A change like this has a chance of nasty side effects if something fundamental is missed, and Adam has been living in Inventory for several months now. |
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.
You're right save_inventory_multi doesn't have a way to pass args to save_child_inventory None of the other child save methods took a target parameter but I see at least save_labels_inventory here does.
👍 to this since the target was never used here anyway. In the future we could add the ability for save_inventory_mutli to pass other args to the child save methods
|
@agrare @blomquisg we have the FINE backport here: It also includes extra-tests to be on the safe side. |
@agrare @blomquisg I asked @cben and @zakiva to have a FINE PR with both the extra-tests and this PR, although it doesn't seem that one yet (it seems it's just the tests). |
|
@zakiva can you cherry-pick the merge commit to your fine pr with the added tests? That way the tests can run on the PR before backporting it. |
|
Backported to Fine via #15543 |
|
Sent a separate PR for Euwe: #15573 |
|
Backported to Euwe via #15573 |
This logic was probably meant to support a targeted refresh which we do not use or plan to. However, it actually causes us a problem since the
targetisn't being passed through the recursive calls.Partial refresh for containers entities will be introduced as part of the container graph refresh in #14337. Meanwhile, I suggest we remove this code:
targetargument from save inventory container methods.deletesvariable and always pass:use_associationinstead.This should solve:
https://bugzilla.redhat.com/show_bug.cgi?id=1436132
https://bugzilla.redhat.com/show_bug.cgi?id=1451832
Still need to add tests.
cc @cben @moolitayer @simon3z