Bug 1295678 - [RFE] better error messages for beanvalidation validation failures.
Summary: [RFE] better error messages for beanvalidation validation failures.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Infra
Version: future
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.1.0-alpha
: 4.1.0
Assignee: Ondra Machacek
QA Contact: Pavol Brilla
URL:
Whiteboard:
: 1295679 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-05 08:38 UTC by Martin Mucha
Modified: 2017-02-01 14:47 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-01 14:47:33 UTC
oVirt Team: Infra
Embargoed:
mperina: ovirt-4.1?
pstehlik: testing_plan_complete-
rule-engine: planning_ack?
mperina: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 58508 0 master MERGED core: utils: print path of constraint violation in validation 2016-06-20 09:07:11 UTC

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


Note You need to log in before you can comment on or make changes to this bug.