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
Delete Container/AWS labels that no longer exist on the provider. #14388
Delete Container/AWS labels that no longer exist on the provider. #14388
Conversation
|
Haven't tested yet but I think this will be no-op for containers, as we don't do targeted (all this So Amazon refresh now also relies on save_inventory_container.rb ? What do you think of moving |
|
@cben - yes, they need to be moved. Just not before feature freeze :-) |
|
|
||
| save_inventory_multi(entity.send(attribute_name), | ||
| hashes, deletes, [:section, :name]) | ||
| hashes, :use_association, [:section, :name]) |
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.
If you don't want to move these functions to save_inventory.rb, please add a comment that they're also serving Amazon refresh.
(The move should be a trivial textual move, there is nothing else to refactor. Again, these modules all end up in one namespace.)
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.
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.
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.
@djberg96 - l heard on SU that you are working on refactoring the shared code referred to here. Can you include the code used in this PR?
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.
@bronaghs Not this particular code atm. I've got a couple PR's in to do a project-wide renaming of ContainerLabelTagMapping to ResourceLabelTagMapping, but that's it for now.
|
Sorry. Finally tested this. Target was not the ems as I thought — it was nil, so @simon3z @moolitayer @zakiva This seems bad. Many things are not getting deleted in our refresh! Also, we need refresher specs where things actually change between 2 refreshes. LGTM for this PR, let's not block you any further, seems we'll need a big followup... |
|
@cben - glad this fixed this issue for you too. |
|
@cben so all entities that are not called on first level from save_ems_container_inventory are not being deleted when they are removed? please create a bz for this issue. |
Never mind, I created https://bugzilla.redhat.com/show_bug.cgi?id=1436132 |
bc4dc79
to
676022e
Compare
|
Checked commits bronaghs/manageiq@29cf052~...676022e with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
|
This pull request is not mergeable. Please rebase and repush. |
|
This was covered by the finally merged #15182 (also find/backported). |
When a label (tag) has been deleted on a resource on AWS, that label should be deleted in the MIQ database too but instead it persists.
Steps to reproduce:
@cben -