-
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
bulk unassign tags on services and vms #13712
bulk unassign tags on services and vms #13712
Conversation
Checked commit jntullo@6fa2e6e with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
data['tags'].collect do |tag| | ||
tags_unassign_resource(resource, type, tag['id'], tag) | ||
end | ||
rescue => err |
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.
Is it possible that this could blow up while unassigning one of the tags, having already succeeded at some, and report a failure for all?
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.
@imtayadeway I suppose anything is possible, although unlikely. I can add in a rescue block around the tags_unassign_resource
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 suppose anything is possible, although unlikely
Yes, agreed 😄
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 can be done in a follow-up PR to handle exceptions for both assign_tags and unassign_tags (which have now parity implementation) and return the appropriate failed action_result for the individual tag and not the whole lot. Thanks.
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.
@jntullo this LGTM with small nit above. Great work! 🎈
LGTM!! 👍 |
Adds ability to bulk unassign tags to multiple services / VM resources
Example:
Links
@miq-bot assign @abellotti
@miq-bot add_label enhancement, api