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 key_pair class lookup #19486

Merged
merged 1 commit into from
Nov 8, 2019
Merged

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented Nov 8, 2019

The issue: it was not able to detect the correct provider specific class for AuthKeyPair

While we would like to avoid delegation, easier to just point to
the parent manager for auth key pairs

fixes issue with #19473
related to https://bugzilla.redhat.com/show_bug.cgi?id=1767747

irb(main):002:0> MiqExpression.miq_adv_search_lists('CloudNetwork', :exp_available_finds)
PostgreSQLAdapter#log_after_checkout, connection_pool: size: 30, connections: 1, in use: 1, waiting_in_queue: 0
Traceback (most recent call last):
       12: from lib/miq_expression.rb:903:in `miq_adv_search_lists'
       11: from lib/miq_expression.rb:802:in `model_details'
       10: from lib/miq_expression.rb:891:in `get_relats'
        9: from lib/miq_expression.rb:942:in `build_relats'
        8: from lib/miq_expression.rb:942:in `each'
        7: from lib/miq_expression.rb:973:in `block in build_relats'
        6: from lib/miq_expression.rb:942:in `build_relats'
        5: from lib/miq_expression.rb:942:in `each'
        4: from lib/miq_expression.rb:952:in `block in build_relats'
NameError (uninitialized constant ManageIQ::Providers::NetworkManager::AuthKeyPair)

While we would like to avoid delegation, easier to just point to
the parent manager for auth key pairs

fixes but with ManageIQ#19473
@miq-bot
Copy link
Member

miq-bot commented Nov 8, 2019

Checked commit kbrock@fe2e292 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🍰

@djberg96
Copy link
Contributor

djberg96 commented Nov 8, 2019

👍

@Fryguy Fryguy merged commit 4640261 into ManageIQ:master Nov 8, 2019
@Fryguy Fryguy added this to the Sprint 124 Ending Nov 11, 2019 milestone Nov 8, 2019
@Fryguy Fryguy self-assigned this Nov 8, 2019
@kbrock kbrock deleted the manager_delegate_fixup branch November 8, 2019 17:22
simaishi pushed a commit that referenced this pull request Jan 7, 2020
@simaishi
Copy link
Contributor

simaishi commented Jan 7, 2020

Ivanchuk backport details:

$ git log -1
commit cb6f2fb2c32a53651adf6b2c5020c2d5837a668d
Author: Jason Frey <[email protected]>
Date:   Fri Nov 8 12:21:21 2019 -0500

    Merge pull request #19486 from kbrock/manager_delegate_fixup

    Fix key_pair class lookup

    (cherry picked from commit 4640261fa9b0acc0eee2084785e5d0570578be86)

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

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.

5 participants