Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3836)

Issue 30760043: Improve charm URL handling.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by frankban
Modified:
10 years, 5 months ago
Reviewers:
bac, rharding, mp+196244
Visibility:
Public.

Description

Improve charm URL handling. Validate the user provided GUI charm URL. Also add a missing test for complete coverage (obsessive-compulsive mode on). Tests: `make check`. QA: 1) Provide invalid charm URLs, the program should immediately stop the execution and exit with an error, e.g.: .venv/bin/python juju-quickstart --gui-charm-url invalid .venv/bin/python juju-quickstart --gui-charm-url local:precise/juju-gui-80 .venv/bin/python juju-quickstart --gui-charm-url http:~juju-gui/precise/juju-gui-80 .venv/bin/python juju-quickstart --gui-charm-url cs:precise/juju-gui-1 bundle:~jorge/mediawiki-simple/4/mediawiki-simple .venv/bin/python juju-quickstart --gui-charm-url cs:saucy/juju-gui-80 2) Run the program passing a customized charm URL, e.g.: .venv/bin/python juju-quickstart --gui-charm-url cs:~juju-gui/precise/juju-gui-128 You should see the "using a customized juju-gui charm" warning printed during the service deployment step. Re-execute the command above: quickstart should reuse the service in the environment and the warning is printed again. Destroy the environment. 3) Now manually deploy an outdated version of the GUI charm: (sudo) juju bootstrap juju deploy cs:precise/juju-gui-79 Run quickstart: .venv/bin/python juju-quickstart You should see the "charm is outdated" warning, then quickstart waits for the outdated GUI to be deployed and ready. Destroy the environment. 4) Run quickstart normally: .venv/bin/python juju-quickstart The last official GUI charm (cs:precise/juju-gui-80) is installed and no warnings are logged. Destroy the environment. Done, thank you! https://code.launchpad.net/~frankban/juju-quickstart/charm-url-warning/+merge/196244 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 15

Patch Set 2 : Improve charm URL handling. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+638 lines, -39 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M quickstart/__init__.py View 1 chunk +1 line, -1 line 0 comments Download
M quickstart/app.py View 2 chunks +2 lines, -6 lines 0 comments Download
A quickstart/charms.py View 1 chunk +118 lines, -0 lines 0 comments Download
M quickstart/manage.py View 1 4 chunks +40 lines, -2 lines 0 comments Download
M quickstart/settings.py View 1 1 chunk +10 lines, -1 line 0 comments Download
M quickstart/tests/test_app.py View 9 chunks +129 lines, -25 lines 0 comments Download
A quickstart/tests/test_charms.py View 1 chunk +205 lines, -0 lines 0 comments Download
M quickstart/tests/test_manage.py View 1 3 chunks +74 lines, -1 line 0 comments Download
M quickstart/tests/test_utils.py View 2 chunks +31 lines, -1 line 0 comments Download
M quickstart/utils.py View 4 chunks +26 lines, -2 lines 0 comments Download

Messages

Total messages: 7
frankban
Please take a look.
10 years, 5 months ago (2013-11-22 09:56:59 UTC) #1
rharding
I'm worried about the dupe code. We've got another project doing charm parsing and such. ...
10 years, 5 months ago (2013-11-22 13:47:33 UTC) #2
rharding
Per irc chat, LGTM on the code. It'll be a nice day when we all ...
10 years, 5 months ago (2013-11-22 14:31:34 UTC) #3
bac
LGTM modulo small suggestions and Rick's concerns. QA OK though I did not do #3. ...
10 years, 5 months ago (2013-11-22 14:31:50 UTC) #4
rharding
QA on #3 is good.
10 years, 5 months ago (2013-11-22 14:40:14 UTC) #5
frankban
*** Submitted: Improve charm URL handling. Validate the user provided GUI charm URL. Also add ...
10 years, 5 months ago (2013-11-22 15:09:25 UTC) #6
frankban
10 years, 5 months ago (2013-11-22 15:14:02 UTC) #7
Hey Rick and Brad,
thank you for the great suggestions in you reviews!
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b