-
Notifications
You must be signed in to change notification settings - Fork 356
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
Enable to add tag for configuration provider #3528
Enable to add tag for configuration provider #3528
Conversation
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1549488 Enable to add tag for configuration provider from 'All Rad Hat Satellites Providers', in Configuration > Management > Providers accordion.
@miq-bot add_label bug, gaprindashvili/yes |
Checked commit hstastna@abd869f with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Tested in UI. LGTM 👍 |
This will be a bug if we ever decide to support other ConfigurationManagers than Foreman. But for now, it does fix a bug :) and does not introduce breakage I can see.. |
@himdel You are right, but also we are in provider foreman controller which cares about everything under Configuration > Management so.. if we ever decide to support other ConfigurationManagers than Foreman, we should also rename the controller and change many more things. |
…rovider Enable to add tag for configuration provider (cherry picked from commit db62fc9) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1553789
Gaprindashvili backport details:
|
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1549488
Enable to add tag for configuration provider from 'All Rad Hat Satellites
Providers', in Configuration > Management > Providers accordion.
Important: the problem in the screen occurs right AFTER clicking on Save button in tagging screen, so it means that tagging screen opens without problems, it is possible to edit tags in the screen, but not to save them properly.
Before: (right after saving tags)
![provider_tag_bad](https://user-images.githubusercontent.com/13417815/37103074-b1aaafb4-2229-11e8-99b6-0966501c81d5.png)
Original screenshot from the BZ, for better understanding/reproducing the problem:
![1519722340014](https://user-images.githubusercontent.com/13417815/37102985-7a12f674-2229-11e8-8c7a-9f9293f6db99.jpg)
After:
![provider_edit_tags](https://user-images.githubusercontent.com/13417815/37102915-44e144ba-2229-11e8-95f3-b43a73cf8b76.png)
![provider_tag_success](https://user-images.githubusercontent.com/13417815/37102871-2c0f716e-2229-11e8-95c1-41c003ba4a8b.png)
Details:
If we go to Configuration > Management > Providers accordion, we are normally on
root
node, it is All Configuration Manager Providers node, in the tree. After selecting some provider(s) in the list and clicking on Edit Tags (under Configuration), we are able to tag the provider and save the changes we made, without any problems. During this process (saving the tags), we enterclass_for_provider_node
method in provider foreman controller, which returnsManageIQ::Providers::ConfigurationManager
. So we know that this works, when tagging a provider. BUT if we enter other node in the tree, for example All Red Hat Satellites Providers or Foreman Providers node (as in my screenshots above), we are no longer on root node soclass_for_provider_node
returns wrong class (but only when saving tags; ). It looks like it has never worked with that class. If we just enter tagging screen (after clicking on Edit Tags),tagging_edit
method gets differentdb
as an argument, comparing to what it gets when saving the tags!