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

Fix for inability to see dialog details passed to catalog after upgrade from 5.9.4 to 5.9.6 #18469

Merged
merged 1 commit into from
Mar 8, 2019

Conversation

eclarizio
Copy link
Member

I don't know the underlying cause of the issue, but when #init_fields_with_values_for_request is called, sometimes the keys of the values hash that gets passed in are symbols instead of strings. This caused an issue of initializing dialog fields with nil values and the customer unable to view the data of the request they made.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1670327

/cc @tinaafitz @d-m-u

@miq-bot add_label bug
@miq-bot add_reviewer @d-m-u
@miq-bot assign @tinaafitz

@eclarizio
Copy link
Member Author

@miq-bot add_label hammer/yes

@miq-bot
Copy link
Member

miq-bot commented Feb 20, 2019

Checked commit eclarizio@142c158 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🍰

@jrafanie
Copy link
Member

@eclarizio I'm not sure where in the scheme of things this occurs, but we've found that if objects are created through the api, such as creating a request in a global region, the keys of options hashes become symbols because json has no notion of string/symbol keys so the api creates things with symbol keys. This could cause a failure down the line when another area of code, such as the code in this PR, tries to access activerecord objects and they have symbols keys when the code was expecting string keys. Making the hash indifferent is the easiest solution and should fix most problems in this area. 👍

@tinaafitz
Copy link
Member

@jrafanie The reported issue has to do with an upgrade and ordering a service from the global region.

@jrafanie
Copy link
Member

@jrafanie The reported issue has to do with an upgrade and ordering a service from the global region.

That sounds like it could be related. If the global region ordering is using the API from the global to create objects in the remote region, it's probably hitting this string/symbol issue. It's good to change this to indifferent access on the client

@eclarizio eclarizio closed this Feb 22, 2019
@eclarizio eclarizio reopened this Feb 22, 2019
@jrafanie jrafanie merged commit 16dabe5 into ManageIQ:master Mar 8, 2019
@jrafanie jrafanie added this to the Sprint 107 Ending Mar 18, 2019 milestone Mar 8, 2019
@jrafanie jrafanie assigned jrafanie and unassigned tinaafitz Mar 8, 2019
@tinaafitz
Copy link
Member

Customer reported issue on 5.9. Erik said it should be okay to back port.
@miq-bot add_label gaprindashvili/yes

simaishi pushed a commit that referenced this pull request Mar 14, 2019
Fix for inability to see dialog details passed to catalog after upgrade from 5.9.4 to 5.9.6

(cherry picked from commit 16dabe5)

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

Hammer backport details:

$ git log -1
commit b355a55a1338feb110d1d0c705cc7f2d5038e6d1
Author: Joe Rafaniello <[email protected]>
Date:   Fri Mar 8 11:49:07 2019 -0500

    Merge pull request #18469 from eclarizio/BZ1670327
    
    Fix for inability to see dialog details passed to catalog after upgrade from 5.9.4 to 5.9.6
    
    (cherry picked from commit 16dabe5eb0b833ca8fbec7bb9ac34ed937be4189)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1688870

simaishi pushed a commit that referenced this pull request Mar 14, 2019
Fix for inability to see dialog details passed to catalog after upgrade from 5.9.4 to 5.9.6

(cherry picked from commit 16dabe5)

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

Gaprindashvili backport details:

$ git log -1
commit 2d74dddac305d03fdf72bbb50d73ef98ba5dde2e
Author: Joe Rafaniello <[email protected]>
Date:   Fri Mar 8 11:49:07 2019 -0500

    Merge pull request #18469 from eclarizio/BZ1670327
    
    Fix for inability to see dialog details passed to catalog after upgrade from 5.9.4 to 5.9.6
    
    (cherry picked from commit 16dabe5eb0b833ca8fbec7bb9ac34ed937be4189)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1688871

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.

6 participants