Bug 1295678 - [RFE] better error messages for beanvalidation validation failures.
[RFE] better error messages for beanvalidation validation failures.
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: BLL.Infra (Show other bugs)
future
Unspecified Unspecified
unspecified Severity low (vote)
: ovirt-4.1.0-alpha
: 4.1.0
Assigned To: Ondra Machacek
Pavol Brilla
: FutureFeature
: 1295679 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-05 03:38 EST by Martin Mucha
Modified: 2017-02-01 09:47 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-01 09:47:33 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
mperina: ovirt‑4.1?
pstehlik: testing_plan_complete-
rule-engine: planning_ack?
mperina: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 58508 master MERGED core: utils: print path of constraint violation in validation 2016-06-20 05:07 EDT

  None (edit)
Description Martin Mucha 2016-01-05 03:38:05 EST
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 04:47:04 EST
*** Bug 1295679 has been marked as a duplicate of this bug. ***
Comment 2 Pavel Stehlik 2016-11-15 14:37:11 EST
CodeChange? If not, please provide repro steps to QE, thank you.
Comment 3 Ondra Machacek 2016-11-16 02:22:49 EST
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 08:54:40 EST
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 07:10:24 EST
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.