[MAGNOLIA-6196] Map2Bean should keep track of conversion problems, so that we can report them in definitions app Created: 06/May/15 Updated: 10/Mar/17 Resolved: 11/Jul/16 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | configuration |
| Affects Version/s: | None |
| Fix Version/s: | 5.5 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Magnolia International | Assignee: | Aleksandr Pchelintcev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 24d 4.5h | ||
| Original Estimate: | 0.5d | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||||||
| Epic Link: | Definitions app | ||||||||||||||||||||||||||||
| Sprint: | Saigon 15, Basel 50, Basel 52 | ||||||||||||||||||||||||||||
| Story Points: | 13 | ||||||||||||||||||||||||||||
| Description |
|
Currently, if a yaml file is loaded with a property that doesn't exist in the corresponding class, we simply log the problem and continue. Ideally, we'd like to keep track of those problems to be able to report them in the config app. They should not necessarily prevent the file from being loaded, but it is likely a user error, such as a typo, that leads to this, so users should be warned. Just logging it seems weak, considering that we have better error handling capabilities in the new config api and app. The current log is particularly weak, since it can't report where the unknown property comes from (what file, for which definition, which registry, etc) + we could perhaps do the same thing in node2bean. |
| Comments |
| Comment by Trang Truong [ 14/Oct/15 ] |
|
I've provided new APIs to manage info.magnolia.api.problem.Problem in magnolia-core module and track all the problems of parsing classpath resources or unknown properties in Map2bean. We will track and aggregate errors during the process of conversion Node2bean later using these new APIs. |
| Comment by Aleksandr Pchelintcev [ 15/Oct/15 ] |
|
Re-opened: see the PR comments. |
| Comment by Trang Truong [ 23/Oct/15 ] |
|
Fixed review naming convention and apply patterns builder, factory |
| Comment by Christopher Zimmermann [ 21/Jul/16 ] |
|
Very cool - I get a useful error message when I use an unknown property. [/form/tabs/0/fields/0] - property [test-bad-property] not found in class [info.magnolia.ui.form.field.definition.TextFieldDefinition], property is not assigned |