Code review comment for lp:~rharding/charmworld/proof-config

Revision history for this message
Richard Harding (rharding) wrote :

Reviewer comments added.

https://codereview.appspot.com/14789043/diff/3001/charmworld/views/api.py
File charmworld/views/api.py (right):

https://codereview.appspot.com/14789043/diff/3001/charmworld/views/api.py#newcode501
charmworld/views/api.py:501: 'errors': [],
this is the list of actual errors. They can be global messages ('could
not parse the file') or objects from error checking a specific bundle in
the file.

https://codereview.appspot.com/14789043/diff/3001/charmworld/views/api.py#newcode502
charmworld/views/api.py:502: 'error_messages': [],
this is a summary of all error messages provided as an aid to marco.

https://codereview.appspot.com/14789043/diff/3001/charmworld/views/api.py#newcode503
charmworld/views/api.py:503: 'debug_info': [],
and a global level 'debug_info' to match the representation of errors of
other areas of the code where they all provide a message as well as
helpful debug information to assist in finding the way to correct the
error.

https://codereview.appspot.com/14789043/diff/3001/charmworld/views/api.py#newcode514
charmworld/views/api.py:514: try:
moved the old checks to the try:catch for the ProofError. I felt this
read a bit cleaner and allows for a function to return a value (the
parsed yaml file) normally, but have a complex object come back during a
failure.

https://codereview.appspot.com/14789043/diff/3001/charmworld/views/tests/test_api.py
File charmworld/views/tests/test_api.py (right):

https://codereview.appspot.com/14789043/diff/3001/charmworld/views/tests/test_api.py#newcode905
charmworld/views/tests/test_api.py:905:
results['errors'][0]['services']['db'][0]['message'])
this is due to the move to support multiple errors on the same service
within a bundle.

https://codereview.appspot.com/14789043/

« Back to merge proposal