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

Don't throw exception when template is not found in Provisioning #5345

Merged
merged 1 commit into from Mar 20, 2019

Conversation

PanSpagetka
Copy link
Contributor

In #3928 was added tooltip for Volume tab in provision form. However, this sometimes causes problems when Template is not found and breaks the form. Because Provision form is used for multiple usecases (Provision, Clone, Publish,...?) and it is not clear when it could fail I think safest solution is just wrap it in try-catch block. I am not very satisfied with this, but it fixes the issue and it doesn't add to much complexity.

Links [Optional]

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

Related PRs:
#3928
#4511

Steps for Testing/QA [Optional]

Try to Provision, Clone, Publish VM

ping @skateman

@PanSpagetka
Copy link
Contributor Author

@miq-bot add_label bug

@miq-bot
Copy link
Member

miq-bot commented Mar 18, 2019

Checked commit PanSpagetka@c00ac93 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. 🍪

end
@record =
if @edit[:new][:src_configured_system_ids].present?
PhysicalServer.where(:id => @edit[:new][:src_configured_system_ids].first).first
Copy link
Member

Choose a reason for hiding this comment

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

Maybe take is semantically more accurate instead of first, but I leave the decision to you.

Copy link
Member

@skateman skateman left a comment

Choose a reason for hiding this comment

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

The Seal of Approval

@mzazrivec mzazrivec self-assigned this Mar 20, 2019
@mzazrivec mzazrivec added this to the Sprint 108 Ending Apr 1, 2019 milestone Mar 20, 2019
@mzazrivec mzazrivec merged commit e7b0336 into ManageIQ:master Mar 20, 2019
simaishi pushed a commit that referenced this pull request Mar 29, 2019
Don't throw exception when template is not found in Provisioning

(cherry picked from commit e7b0336)

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

Hammer backport details:

$ git log -1
commit 2bffa021bbbeab16dc7fbf423c8c083de677c467
Author: Milan Zázrivec <mzazrivec@redhat.com>
Date:   Wed Mar 20 10:36:29 2019 +0100

    Merge pull request #5345 from PanSpagetka/bz1687946
    
    Don't throw exception when template is not found in Provisioning
    
    (cherry picked from commit e7b033674776811ebe24c42223358ab7d9578525)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1693740

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