confusing schema validation error when mandatory subkey is missing

Bug #819009 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyjuju
New
Undecided
Unassigned

Bug Description

This looks very similar to bug 813831.

Something with very similar symptoms occurred to me with clint's lxc branch:
I was missing a required lxc subkey, but the error claimed:
environments.local.type: expected 'ec2', got 'lxc'

The actual best error raised during schema validation was:
environments.local.storage-directory: required value not found

but both had path length (5) so the more specific error did not override the less specific error.

Perhaps this would be fixed by setting the path ['environments', '.', 'local', '.', 'storage-directory'] similar to how the type error path is set - e.g.

['environments', '.', 'local', '.', 'storage-directory', '.', 'existence']

Revision history for this message
William Reade (fwereade) wrote :

If you merge the latest trunk, and use a SelectDict instead of a OneOf in ensemble.environment.config, you should see some improvement.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

I think this actually was part of 813831, marking as a dupe.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.