Bug 1824764

Summary: Not getting proper error message while updating method
Product: Red Hat CloudForms Management Engine Reporter: Devidas Gaikwad <dgaikwad>
Component: AutomateAssignee: Tina Fitzgerald <tfitzger>
Status: CLOSED DEFERRED QA Contact: Sudhir Mallamprabhakara <smallamp>
Severity: low Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: unspecified    
Version: 5.11.5CC: dmetzger, gmccullo, hkataria, mkanoor, mzazrivec, obarenbo, znemecko
Target Milestone: GAFlags: dgaikwad: needinfo+
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-22 13:50:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description Devidas Gaikwad 2020-04-16 12:37:53 UTC
Description of problem:

While Updating the method we are not getting a proper error message. It does not tell what is a problem actually.

Version-Release number of selected component (if applicable):
5.11.5.1

How reproducible:

100%

Steps to Reproduce:

1. Add Ansible tower provider in CFME
2. Navigate Automation=>Automate=>Explorer 
3. Create Domain, namespace, class, and method with valid input.
4. Try to update method by adding new Input Parameter and use Input Parameter name example "@123", "###" and try to save it.
5. Once we click on save button it gives "Error during 'save': Failed to replace inputs because one or more of the new records could not be saved." error message. The error messages do not tell what is the actual problem with Input Parameter name.

Actual results:
"Error during 'save': Failed to replace inputs because one or more of the new records could not be saved."


Expected results:

The error message should describe the actual problem .

Additional info:
Getting this issue on both "Ansible Tower Job Template" and "Ansible Tower Workflow Template" method type.

Comment 2 Dave Johnson 2020-04-16 14:02:42 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set the severity to Low.

Comment 3 Milan Zázrivec 2020-04-17 15:45:11 UTC
I'm confirming the error, it also happens on current ManageIQ master.

It also seems that it only happens when *adding* a new MiqAeField with invalid name.
In this case, you'll get the following error:

    Error during 'save': Failed to replace inputs because one or more of the new records could not be saved.

which is propagated all the way from activerecord.

When editing existing MiqAeField so that it has invalid name, you'll see correct
validation error:

    Error during 'save': Validation failed: MiqAeMethod: Name may contain only alphanumeric and _ characters

This error on the other hand comes from MiqAeMethod name validation.

I'm not sure this is UI issue, assigning over to automate.

Comment 4 dmetzger 2020-04-22 13:50:28 UTC
This issue has been moved to the ManageIQ Github Issue list, for triaging /tracking / scheduling.

The issue can be found here: https://github.com/ManageIQ/manageiq-automation_engine/issues/441

Please see https://www.manageiq.org/docs/guides/triage_process for a descripion of the ManageIQ Issue Lifecycle.