Skip to content
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

Merged

Conversation

hstastna
Copy link
Contributor

@hstastna hstastna commented Mar 7, 2018

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

Original screenshot from the BZ, for better understanding/reproducing the problem:
1519722340014

After:
provider_edit_tags
provider_tag_success

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 enter class_for_provider_node method in provider foreman controller, which returns ManageIQ::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 so class_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 different db as an argument, comparing to what it gets when saving the tags!

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.
@hstastna
Copy link
Contributor Author

hstastna commented Mar 7, 2018

@miq-bot add_label bug, gaprindashvili/yes

@miq-bot
Copy link
Member

miq-bot commented Mar 7, 2018

Checked commit hstastna@abd869f with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 👍

@ZitaNemeckova
Copy link
Contributor

ZitaNemeckova commented Mar 9, 2018

Tested in UI. LGTM 👍

@himdel
Copy link
Contributor

himdel commented Mar 9, 2018

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 himdel merged commit db62fc9 into ManageIQ:master Mar 9, 2018
@himdel himdel self-assigned this Mar 9, 2018
@himdel himdel added this to the Sprint 81 Ending Mar 12, 2018 milestone Mar 9, 2018
@hstastna
Copy link
Contributor Author

hstastna commented Mar 9, 2018

@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.

simaishi pushed a commit that referenced this pull request Mar 9, 2018
…rovider

Enable to add tag for configuration provider
(cherry picked from commit db62fc9)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1553789
@simaishi
Copy link
Contributor

simaishi commented Mar 9, 2018

Gaprindashvili backport details:

$ git log -1
commit d0f01699e68de4a636c573670ef5a48259be911f
Author: Martin Hradil <himdel@seznam.cz>
Date:   Fri Mar 9 12:36:19 2018 +0000

    Merge pull request #3528 from hstastna/Unable_add_tag_configuration_provider
    
    Enable to add tag for configuration provider
    (cherry picked from commit db62fc90bcc1f5057cf74c8923f3a2e9d31b5b8e)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1553789

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants