juju-tosca team mailing list archive
-
juju-tosca team
-
Mailing list archive
-
Message #00009
charm_proof error reporting
Hi all,
When I run charm-proof I'm getting the following output:
gubber:~/CODE/juju-tosca(toscalib)> charm-proof -b ./BUNDLE/
Traceback (most recent call last):
File "/usr/bin/charm-proof", line 9, in <module>
load_entry_point('charm-tools==1.4.0', 'console_scripts',
'charm-proof')()
File "/usr/lib/python2.7/dist-packages/charmtools/proof.py", line 71,
in main
args_.secure)
File "/usr/lib/python2.7/dist-packages/charmtools/proof.py", line 63,
in proof
remote=with_remote, server=server, port=port, secure=secure)
File "/usr/lib/python2.7/dist-packages/charmtools/bundles.py", line
111, in proof
lint.remote_proof(self, server, port, secure)
File "/usr/lib/python2.7/dist-packages/charmtools/bundles.py", line
67, in remote_proof
proof_output = bundles.proof(deployer_file)
File "/usr/lib/python2.7/dist-packages/charmworldlib/bundle.py", line
25, in proof
{'deployer_file': yaml.dump(deployer_contents)})
File "/usr/lib/python2.7/dist-packages/charmworldlib/api.py", line
21, in post
return self.fetch_json(endpoint, params, 'post')
File "/usr/lib/python2.7/dist-packages/charmworldlib/api.py", line
26, in fetch_json
raise Exception('Request failed with: %s' % r.status_code)
Exception: Request failed with: 500
It looks like it corresponds with an "error connecting to charmworld
API" that I was getting in the GUI as well. However, since it's a
backtrace, it's pretty hard for a user to decipher. Would it be a
reasonable improvement to trap this and generate an error message?
If I add the -n flag, I get normal looking output.
On a related front, when I had another issue with my bundle (yaml file
name incorrect) I got this output:
gubber:~/CODE/juju-tosca(toscalib)> charm-proof -b ./BUNDLE/
FATAL: Not a bundle
It took me quite a while to figure out exactly what it was unhappy
about. Would it be possible to have some additional output for cases
like this something like:
gubber:~/CODE/juju-tosca(toscalib)> charm-proof -bn ./BUNDLE/
E: Not a bundle, bundles.yaml file not found.
I'd be happy to open Launchpad bugs for these if you think they're
worthwhile. Not sure if you'd prefer multiple reports or a single one
with both suggestions.
Thanks for any input