[openstack-dev] [neutron][neutron-*] Notice! pylint breakage
Paul Michali
pc at michali.net
Tue Dec 1 11:44:26 UTC 2015
I found a problem yesterday running pep8 locally in neutron-lbaas. After
discussing with LBaaS team, we identified that there is a problem with
pylint. The same issues were seen, when hecking in neutron and
neutron-vpnaas repos (need to check neutron-fwaas). There are two issues
seen.
First, the new version of pylint (1.5.0) is finding additional
warnings/errors. This will require updates to code, to be compliant with
the new pylint (assuming we move up to that version). I did see one case
where the changes needed for pylint 1.5.0 are backward incompatible with
pylint 1.4.4, which raises another concern (how to migrate to newer pylint).
Second, pylint uses the astroid package, which was recently update from
1.3.8 to 1.4.1. When used with pylint 1.4.4 (the currently used version in
neutron), we get all sorts of false positive errors. For example, use of
each imported module shows a "undefined variable" error.
In neutron-vpnaas, this issue is worse, as pylint iand astroid are not
pinned to any version, so it can update at unexpected times.
After talking to infra, here are the proposed solutions...
Neutron - In pretty good shape
The pep8-constraints job currently works, as global requirements in pylint
to 1.4.4 and upper constraints pin astroid to 1.3.8 - both work together
well. Locally, one needs to use pep8-constraints and not pep8, as the
latter will pull in the latest astroid (1.4.1) and cause havoc.
Infra is pushing up two commits to global requirements to pin astroid to
1.3.8 for kilo (251600) and juno (251599). We need to pin astroid to 1.3.8
in test-requirements.txt for those branches. I'll start on that in a few
minutes.
LBaaS/VPNaaS/FWaas? - Needs constraints
For pep8 jobs, these repos need to use the new pep8-constraints style job
and tox.ini should also use the same target, instead of pep8. Like neutron,
kilo and juno branches need to pin astroid to 1.3.8.
neutron-vpnaas should also pin pylint to 1.4.4 in test-requirements.txt, to
prevent it from floating to 1.5.0.
All repos will need a plan for updating code to conform to pylint 1.5.0,
if/when we upgrade to this.
Note: I have not looked at neutron-fwaas, so we need to confirm the above
issue is present, but it likely is (even if there is not a current pylint
failure).
One concern I have, that infra hasn't figured out how it can be addressed,
is how we'll update to pylint 1.5.0. If were are using pep8-constraints,
the constraints file is in a different repo. Updating, to say, pylint 1.5.0
and astroid 1.4.1, would cause breakage until both the neutron* repos and
requirements repo are updated. This is complicated with backward
incompatible changes needed.
Thanks to blogan, ZZelle, fungi, anteaya, lifeless, ajmiller and others for
helping investigate and come up with the approach on this issue!
Regards,
Paul Michali (pc_m)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20151201/5c035157/attachment.html>
More information about the OpenStack-dev
mailing list