Merge lp:~codersquid/charms/trusty/python-django/pip-extra-args into lp:charms/python-django
| Status: | Work in progress |
|---|---|
| Proposed branch: | lp:~codersquid/charms/trusty/python-django/pip-extra-args |
| Merge into: | lp:charms/python-django |
| Diff against target: |
93 lines (+13/-16) 2 files modified
config.yaml (+1/-1) hooks/hooks.py (+12/-15) |
| To merge this branch: | bzr merge lp:~codersquid/charms/trusty/python-django/pip-extra-args |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Cory Johns | Needs Fixing on 2015-02-03 | ||
| Review Queue (community) | automated testing | Needs Fixing on 2015-01-08 | |
| charmers | 2015-01-07 | Pending | |
|
Review via email:
|
|||
Commit Message
This change adds pip_extra_args functionality. hooks.py now uses the pip_extra_args config option. This allows people to specify useful things like --no-index and --find-links.
Based on the ability of a user to set pip_extra_args:.
* parameters that were getting passed to pip were removed, i.e. --upgrade, --use-mirrors, -b, --src.
* since --upgrade was a default in hooks.py, I set the config default to use --upgrade.
Description of the Change
This change adds pip_extra_args functionality. hooks.py now uses the pip_extra_args config option. This allows people to specify useful things like --no-index and --find-links.
Based on the ability of a user to set pip_extra_args:.
* parameters that were getting passed to pip were removed, i.e. --upgrade, --use-mirrors, -b, --src.
* since --upgrade was a default in hooks.py, I set the config default to use --upgrade.
| Cory Johns (johnsca) wrote : | # |
Sheila,
Thank you for this contribution to the python-django charm. The test failure appears to be valid, however it seems to be failing due to an existing value in tests/config/
I think that if you change the "-U -i http://
One other thing to note, which is also not directly changed in this MP but should probably be addressed, is that the tests are hard-coded in django.yaml to use the precise versions of all of the charms and may not properly test this charms changes. It should be easy enough to change the secondary charms to point to the trusty versions and to remove the branch from the python-django charm entry to have it use the code from this charm.
Thanks again for this contribution, and I look forward to seeing it merged.
| Cory Johns (johnsca) wrote : | # |
For reference, to reproduce this, I ran the tests using bundletester (which is how the automated test runner runs them): https:/
| Sheila Miguez (codersquid) wrote : | # |
Hi Cory, I'm finally getting around to working on this again. I want to make sure I'm invoking bundletester correctly before fixing my changes. It currently fails on trunk. I've branched trunk, and tried this from the top level directory of my branch.
$ bundletester -l DEBUG -o result --testdir tests
DEBUG:bundletes
DEBUG:root:
DEBUG:deployer.
DEBUG:deployer.
DEBUG:deployer.env: Terminating machines
DEBUG:root:Waiting for services to be removed...
DEBUG:runner:call ['/tmp/
DEBUG:runner:
DEBUG:runner:
DEBUG:runner:
DEBUG:runner:
DEBUG:runner:
DEBUG:runner:
DEBUG:runner:
DEBUG:runner:
DEBUG:runner:
DEBUG:runner:
DEBUG:runner:ERROR
DEBUG:runner:
DEBUG:runner:
DEBUG:runner:ERROR: setUpModule (__main__)
DEBUG:runner:
DEBUG:runner:
DEBUG:runner: File "/tmp/bundletes
DEBUG:runner: timeout=2000)
DEBUG:runner: File "/tmp/bundletes
DEBUG:runner: subprocess.
DEBUG:runner: File "/usr/lib/
DEBUG:runner: raise CalledProcessEr
DEBUG:runner:
DEBUG:runner:
DEBUG:runner:
DEBUG:runner:Ran 0 tests in 0.396s
DEBUG:runner:
DEBUG:runner:FAILED (errors=1)
DEBUG:runner:Exit Code: 1
DEBUG:bundletes
ubuntu@
on factor that may confound things
I'm calling bundletester within a container since bundletester wants a different copy of bzr than I have on my system and I need to keep my system the same. I've configured...
| Sheila Miguez (codersquid) wrote : | # |
On Sun, Mar 8, 2015 at 3:27 PM, Sheila Miguez <email address hidden>
wrote:
> $ bundletester -l DEBUG -o result --testdir tests
btw, I got trunk running in an amazon environment and ended up allowing
bundletester to screw up my bzr install (which I wish wouldn't happen).
bundletester -e amazon -l DEBUG -v
now trunk is failing for a better reason, which is that yaml is missing.
that's easy to figure out. I wish bundletester would run something to check
for and/or install the required dependencies.
--
<email address hidden>
| Cory Johns (johnsca) wrote : | # |
Sheila,
I'm sorry to hear that bundletester caused an issue with your bzr. Apparently, this is an issue that I was not aware of, and is due to bundletester being tagged to a specific, newer version of the bzr library due to a compatibility issue. I apparently have been using the newer version of bzr for a while without realizing it.
One option for working around the bzr library issue is to install bundletester inside a virtualenv:
sudo apt-get install virtualenvwrapper
mkvirtualenv bundletester
pip install bundletester
This should isolate the bzr library version from the one you use on your system. Then, before running bundletester, you can use "workon bundletester" to activate the virtualenv, then run bundletester, then, to get back to your normal system env, "deactivate".
We're also working on a Docker container solution that will hopefully allow you to very easily run tests in the exact same environment that the CI will use, but unfortunately it's not quite ready for use yet.
| Marco Ceppi (marcoceppi) wrote : | # |
Hi Sheila, sorry again that bundletester messed up your environment. While you're working on this merge I'm going to move this to Work In Progress, when ready for another review move this to "Needs Review"
Unmerged revisions
- 35. By Sheila Miguez on 2015-01-07
-
pip install now uses the pip_extra_args settings from config.
with that in mind, --upgrade, --use-mirrors (which is deprecated), -b, and --src were all removed
Since --upgrade was set to True by default in hooks.py, I set the config default to '--upgrade'.

This items has failed automated testing! Results available here http:// reports. vapour. ws/charm- tests/charm- bundle- test-10877- results