Bug 1295678

Summary: [RFE] better error messages for beanvalidation validation failures.
Product: [oVirt] ovirt-engine Reporter: Martin Mucha <mmucha>
Component: BLL.InfraAssignee: Ondra Machacek <omachace>
Status: CLOSED CURRENTRELEASE QA Contact: Pavol Brilla <pbrilla>
Severity: low Docs Contact:
Priority: unspecified    
Version: futureCC: bugs, mperina, omachace, oourfali, pstehlik
Target Milestone: ovirt-4.1.0-alphaKeywords: FutureFeature
Target Release: 4.1.0Flags: mperina: ovirt-4.1?
pstehlik: testing_plan_complete-
rule-engine: planning_ack?
mperina: devel_ack+
pstehlik: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-01 14:47:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Mucha 2016-01-05 08:38:05 UTC
Description of problem:
currently, if big transfer object (*Parameters) is validated, only the message of failure is rendered to the user. That is description of failing field. However if given transfer object forms along aggregations a deep tree, it would be better if better identification of failing field is provided. Imagine *Parameters class, which aggregates 20 another bean in collection; it'd be better if failing bean is identified.

Each ConstraintViolation instance has propertyPath exactly identifying record containing failing field. We can somehow use this information and present it to the user.

Comment 1 Martin Mucha 2016-01-05 09:47:04 UTC
*** Bug 1295679 has been marked as a duplicate of this bug. ***

Comment 2 Pavel Stehlik 2016-11-15 19:37:11 UTC
CodeChange? If not, please provide repro steps to QE, thank you.

Comment 3 Ondra Machacek 2016-11-16 07:22:49 UTC
As said in description, this RFE improves user messages, which should help to developer recognize the problem.

When user for example added new NIC to VM, which didn't passed validation, he used to see this message:

 - Name must be formed of alphanumeric characters, numbers or "-_.".

This RFE improves the message so the developer knows where the validation fails:

 - Name must be formed of alphanumeric characters, numbers or "-_.".
 - Attribute: nic.name

This new message format should be visible in UI, API and logs.

So to test, QE should try some commands which will fail and check whether this new format message appears appropriately and properly.

Comment 4 Sandro Bonazzola 2016-12-12 13:54:40 UTC
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.

Comment 5 Pavol Brilla 2017-01-31 12:10:24 UTC
Verified on: rhevm.noarch 4.1.0.2-0.1.el7