Merge lp://qastaging/~hopem/charm-helpers/lp1257763 into lp://qastaging/charm-helpers

Proposed by Edward Hope-Morley
Status: Superseded
Proposed branch: lp://qastaging/~hopem/charm-helpers/lp1257763
Merge into: lp://qastaging/charm-helpers
Diff against target: 156 lines (+66/-31)
6 files modified
.bzrignore (+1/-0)
Makefile (+17/-8)
README.test (+2/-9)
test-requirements-precise.txt (+15/-0)
test-requirements-trusty.txt (+8/-14)
tox.ini (+23/-0)
To merge this branch: bzr merge lp://qastaging/~hopem/charm-helpers/lp1257763
Reviewer Review Type Date Requested Status
Jorge Niedbalski (community) Needs Fixing
Benjamin Saller (community) Needs Fixing
Cory Johns Pending
Kapil Thangavelu Pending
James Page Pending
charmers Pending
Review via email: mp+228685@code.qastaging.launchpad.net

This proposal has been superseded by a proposal from 2014-09-01.

To post a comment you must log in.
Revision history for this message
James Page (james-page) wrote :

Interestingly I start seeing errors when using tox - lists seem to be out of order...

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Hmm dep versions need tweaking perhaps. Will dig...

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Should be working better now, tested on Trusty. I had to apt-get build-dep a could of dependencies to get it to work tho (see commit message).

Revision history for this message
Edward Hope-Morley (hopem) wrote :

@jamespage quick thought, which version of tox are you using? I am using tox==1.6.1 since newer versions seem to flake out with openstack.

Revision history for this message
Edward Hope-Morley (hopem) wrote :

So, some more info. I have now tested this on precise, trusty, utopic and all work fine with tox==1.6.1 (incidentally the version used with openstack since never versions seem to break) but if I use latest i.e. tox==1.7.2 I get a bunch of unit test errors where lists have reversed order.

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Adding in support dist-specific deps i.e. precise, trusty...

Revision history for this message
Benjamin Saller (bcsaller) wrote :

Thanks for this.

If you agree with the following I'm +1 on this.

=== modified file 'tox.ini'
--- tox.ini 2014-08-07 10:24:25 +0000
+++ tox.ini 2014-08-18 17:06:39 +0000
@@ -17,7 +17,7 @@

 [testenv:pep8]
 deps = -r{toxinidir}/test-requirements-trusty.txt
-commands = flake8 --ignore=E123,E501 {posargs}
+commands = flake8 --ignore=E123,E501 {posargs} charmhelpers

 [testenv:venv]
 commands = {posargs}

Currently it runs pep8 on the whole stdlib making its long and the feedback ignorable.

review: Needs Fixing
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

Hello,

I am more than happy to see this change set landing on charmhelpers. I will second the change proposed by @bcsaller.

With that fixed, LGTM.

review: Needs Fixing
Revision history for this message
Cory Johns (johnsca) wrote :

> Interestingly I start seeing errors when using tox - lists seem to be out of
> order...

I had proposed another tox merge with fixes for the fragile tests: https://code.launchpad.net/~johnsca/charm-helpers/tox/+merge/226180 (lines 157 through 266 in that diff).

However, that merge stalled because it contained wheel files for some of the dependencies, so maybe the test fixes could be ported to this MP and I could retire mine?

Revision history for this message
Edward Hope-Morley (hopem) wrote :

> > Interestingly I start seeing errors when using tox - lists seem to be out of
> > order...
>
> I had proposed another tox merge with fixes for the fragile tests:
> https://code.launchpad.net/~johnsca/charm-helpers/tox/+merge/226180 (lines 157
> through 266 in that diff).
>
> However, that merge stalled because it contained wheel files for some of the
> dependencies, so maybe the test fixes could be ported to this MP and I could
> retire mine?

Cory, I am concerned that the test errors (list inversions) caused by newer versions of tox are a result of tox causing some unexpected side effects in the tests, the scope of which is unclear. It is partially for this reason that I decided to pin tox to 1.6.1 which incidentally is the same rule currently used in upstream openstack.

Revision history for this message
Edward Hope-Morley (hopem) wrote :

> Thanks for this.
>
> If you agree with the following I'm +1 on this.
>
> === modified file 'tox.ini'
> --- tox.ini 2014-08-07 10:24:25 +0000
> +++ tox.ini 2014-08-18 17:06:39 +0000
> @@ -17,7 +17,7 @@
>
> [testenv:pep8]
> deps = -r{toxinidir}/test-requirements-trusty.txt
> -commands = flake8 --ignore=E123,E501 {posargs}
> +commands = flake8 --ignore=E123,E501 {posargs} charmhelpers
>
> [testenv:venv]
> commands = {posargs}
>
>
> Currently it runs pep8 on the whole stdlib making its long and the feedback
> ignorable.

Agreed, will fix. Thanks for reviewing.

Revision history for this message
Cory Johns (johnsca) wrote :

> Cory, I am concerned that the test errors (list inversions) caused by newer
> versions of tox are a result of tox causing some unexpected side effects in
> the tests, the scope of which is unclear. It is partially for this reason that
> I decided to pin tox to 1.6.1 which incidentally is the same rule currently
> used in upstream openstack.

The failures that I fixed in my merge are just tests relying on the ordering of of keyword args (i.e., dict items), which is undefined and subject to change at any time. My fixes just remove the strict ordering dependencies by replacing, e.g., assertEqual() with assertItemsEqual(). Without those changes, these tests are pretty much guaranteed to fail at some point.

I'm not averse to pinning the version of tox, but I think those test fixes should be made regardless.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

For the most part this looks good to me and works well. I added a few minor suggestions inline. Also, is README.tests out of date? It seems like it could be updated or removed.

192. By Edward Hope-Morley

synced lp:charm-helpers

193. By Edward Hope-Morley

applied corey.bryant changes

Revision history for this message
Edward Hope-Morley (hopem) wrote :

@corey.bryant - changes applied

@corey.johnsca - sounds like the newer versions of tox are just stricter in which case it is not a bug and you are absolutely correct. Could we possibly apply your suggested fixes as part of a separate patchset in order to avoid bloating this one? (if you agree i'll raise a seperate bug to get it fixed).

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Sorry, a few more comments inline below.

194. By Edward Hope-Morley

* allow DIST to be set in env
* added extra deps to README.test

Unmerged revisions

194. By Edward Hope-Morley

* allow DIST to be set in env
* added extra deps to README.test

193. By Edward Hope-Morley

applied corey.bryant changes

192. By Edward Hope-Morley

synced lp:charm-helpers

191. By Edward Hope-Morley

synced trunk

190. By Edward Hope-Morley

added specific dirs to pep8 tox run

189. By Edward Hope-Morley

added tox version check

188. By Edward Hope-Morley

pep8/lint should always be trusty

187. By Edward Hope-Morley

synced trunk and resolved merge conflicts

186. By Edward Hope-Morley

Added support for distribition specific dependencies

We now default to current LTS but can switch to other dist deps if needed.

185. By Edward Hope-Morley

* don't use site-packages
* set versions to trusty
* need to do this prior run:
    sudo apt-get build-dep python-launchpadlib
    sudo apt-get build-dep python-apt

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches