platform9/express-cli

CLI should validate successful github API response when trying to download express packages

Closed this issue · 1 comments

Ran into this error but the CLI did not print it - had to debug into logs to see the issue

ubuntu@madhura-pmkft-test:~$ /opt/pf9/cli/bin/express init
{'documentation_url': 'https://developer.github.com/v3/#rate-limiting', 'message': "API rate limit exceeded for 38.140.51.154. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)"}
Traceback (most recent call last):
File "/opt/pf9/cli/bin/express", line 8, in
sys.exit(cli())
File "/opt/pf9/cli/lib/python3.5/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/opt/pf9/cli/lib/python3.5/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/opt/pf9/cli/lib/python3.5/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/pf9/cli/lib/python3.5/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/pf9/cli/lib/python3.5/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/opt/pf9/cli/lib/python3.5/site-packages/click/decorators.py", line 27, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "/opt/pf9/cli/lib/python3.5/site-packages/pf9/express.py", line 53, in init
exp_ver = get_exp_ver.get_release_json()
File "/opt/pf9/cli/lib/python3.5/site-packages/pf9/modules/util.py", line 94, in get_release_json
"version": response["name"],
KeyError: 'name'

We have moved away from relying on GitHub API for express setup.