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 provisioning dialog 'src_vm_id' method #145

Conversation

jaywcarman
Copy link
Member

The 'allowed_templates' method is a core method to generate a list of
templates for the selection dialog. This is explicitly necessary when
creating a catalog item since the user selects the template after
entering into the request dialog (in contrast to the 'Lifecycle >
Provision VMs using this Template' which auto-selects the template).

Without this, the following exception is raised when attempting to
definite a Power HMC VM provision catalog item:

FATAL -- : Error caught: [NoMethodError] undefined method `any?' for nil:NilClass

The 'allowed_templates' method is a core method to generate a list of
templates for the selection dialog. This is explicitly necessary when
creating a catalog item since the user selects the template after
entering into the request dialog (in contrast to the 'Lifecycle >
Provision VMs using this Template' which auto-selects the template).

Without this, the following exception is raised when attempting to
definite a Power HMC VM provision catalog item:

FATAL -- : Error caught: [NoMethodError] undefined method `any?' for nil:NilClass
@jaywcarman jaywcarman added the bug Something isn't working label Sep 22, 2023
Copy link
Member

@Fryguy Fryguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agrare Please also review. I wonder if there's a way to catch this with specs?

@Fryguy Fryguy added quinteros/yes? and removed bug Something isn't working labels Sep 22, 2023
@miq-bot
Copy link
Member

miq-bot commented Sep 22, 2023

Checked commit jaywcarman@41cbe2b with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint
0 files checked, 0 offenses detected
Everything looks fine. 👍

@agrare
Copy link
Member

agrare commented Sep 22, 2023

Yeah we've been bitten by these content dialog files before, I'm not sure how best to test them since they are processed by the UI controllers

@jaywcarman
Copy link
Member Author

jaywcarman commented Sep 22, 2023

I wonder if there's a way to catch this with specs?

Would love to add this, but wasn't sure how to write specs for the dialog itself.

We currently have specs for the HMC ProvisionWorkflow here - but that just stubs a dialog.

@Fryguy Fryguy added the bug Something isn't working label Sep 26, 2023
@Fryguy
Copy link
Member

Fryguy commented Sep 26, 2023

I'm going to merge this anyway, since we'll have to come up with a way to do specs more comprehensively.

@Fryguy Fryguy merged commit 8713488 into ManageIQ:master Sep 26, 2023
3 checks passed
@jaywcarman jaywcarman deleted the fix_hmc_provisioning_dialog_src_vm_id_method branch September 26, 2023 14:17
@Fryguy
Copy link
Member

Fryguy commented Sep 27, 2023

Backported to quinteros in commit f2aa579.

commit f2aa579c1ae8f5be2ca2147380ad3c0f957de96e
Author: Jason Frey <fryguy9@gmail.com>
Date:   Tue Sep 26 09:36:30 2023 -0400

    Merge pull request #145 from jaywcarman/fix_hmc_provisioning_dialog_src_vm_id_method
    
    Fix provisioning dialog 'src_vm_id' method
    
    (cherry picked from commit 87134884fd35db4d3c88a978b774365d707ffb0e)

Fryguy added a commit that referenced this pull request Sep 27, 2023
…rc_vm_id_method

Fix provisioning dialog 'src_vm_id' method

(cherry picked from commit 8713488)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working quinteros/backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants