This is a massive branch: my apologies.
But:
- a new module has been created (netutils), so there
are license headers and moreover some existing
functions (with their tests) have been just moved
from utils.py and must not be re-reviewed.
The only new function there is check_listening.
- most of the code are tests: we reached 700 unit
tests yay!
This branch changes the way quickstart is run on an
existing environment: instead of always trying to
bootstrap, it looks for the jenv file for the current
environment, and, if present, it retrieves the API URL
from there. As a consequence, quickstart uses Juju
in a less expensive way, and it's also faster when
invoked on a bootstrapped environment.
Split the app.bootstrap function to two new
functions: app.bootstrap and app.status. The intent
is to make them more reusable and more easy to test.
Fix a subtle bug never reported and not easy to hit:
the environment type of an existing environment is
now retrieved from the jenv, rather than relying on
what's stored in the environments.yaml file.
Also reorganized the tests for manage.run: over
time they ended up failing to achieve their goal
of describing how the application is run, and
become not really easy to update and change.
Now this situation should be improved.
The little change to the HACKING file is to make
the rst to render correctly on sublime text.
Tests: `make check`.
QA: run quickstart as usual on local and ec2.
Run quickstart again on an already bootstrapped
environment (local and ec2). You should no longer
see the "bootstrapping environment" message.
Instead, a more correct "reusing the already
bootstrapped..." message is displayed.
Also this should feel quicker, especially on ec2.
Affected files (+761, -511 lines):
M HACKING.rst
A [revision details]
M quickstart/app.py
M quickstart/manage.py
A quickstart/netutils.py
M quickstart/tests/helpers.py
M quickstart/tests/test_app.py
M quickstart/tests/test_manage.py
A quickstart/tests/test_netutils.py
M quickstart/tests/test_utils.py
M quickstart/utils.py
M quickstart/watchers.py
Reviewers: mp+241553_ code.launchpad. net,
Message:
Please take a look.
Description:
New bootstrap strategy.
This is a massive branch: my apologies.
But:
- a new module has been created (netutils), so there
are license headers and moreover some existing
functions (with their tests) have been just moved
from utils.py and must not be re-reviewed.
The only new function there is check_listening.
- most of the code are tests: we reached 700 unit
tests yay!
This branch changes the way quickstart is run on an
existing environment: instead of always trying to
bootstrap, it looks for the jenv file for the current
environment, and, if present, it retrieves the API URL
from there. As a consequence, quickstart uses Juju
in a less expensive way, and it's also faster when
invoked on a bootstrapped environment.
Split the app.bootstrap function to two new
functions: app.bootstrap and app.status. The intent
is to make them more reusable and more easy to test.
Fix a subtle bug never reported and not easy to hit:
the environment type of an existing environment is
now retrieved from the jenv, rather than relying on
what's stored in the environments.yaml file.
Also reorganized the tests for manage.run: over
time they ended up failing to achieve their goal
of describing how the application is run, and
become not really easy to update and change.
Now this situation should be improved.
The little change to the HACKING file is to make
the rst to render correctly on sublime text.
Tests: `make check`.
QA: run quickstart as usual on local and ec2.
Run quickstart again on an already bootstrapped
environment (local and ec2). You should no longer
see the "bootstrapping environment" message.
Instead, a more correct "reusing the already
bootstrapped..." message is displayed.
Also this should feel quicker, especially on ec2.
Thank you!
https:/ /code.launchpad .net/~frankban/ juju-quickstart /new-bootstrap- strategy/ +merge/ 241553
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/172380043/
Affected files (+761, -511 lines): manage. py netutils. py tests/helpers. py tests/test_ app.py tests/test_ manage. py tests/test_ netutils. py tests/test_ utils.py watchers. py
M HACKING.rst
A [revision details]
M quickstart/app.py
M quickstart/
A quickstart/
M quickstart/
M quickstart/
M quickstart/
A quickstart/
M quickstart/
M quickstart/utils.py
M quickstart/