pep8 error caused by hacking version < 3.0.1

Bug #1878317 reported by Brin Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Brin Zhang

Bug Description

flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.

Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.

To avoid similar gate break in future, we need to bump the hacking min
version.

- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html

https://review.opendev.org/#/c/727347/ changing the hacing version, but some related error in the code, see below:

pep8 run-test-pre: PYTHONHASHSEED='1704528896'
pep8 finish: run-test-pre after 0.00 seconds
pep8 start: run-test
pep8 run-test: commands[0] | bash tools/flake8wrap.sh
setting PATH=/home/zuul/src/opendev.org/openstack/nova/.tox/shared/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
[4453] /home/zuul/src/opendev.org/openstack/nova$ /bin/bash tools/flake8wrap.sh
Running flake8 on all files

./nova/tests/unit/virt/vmwareapi/test_driver_api.py:126:14: H202: assertRaises Exception too broad
./nova/tests/unit/compute/test_compute_mgr.py:6264:9: E306 expected 1 blank line before a nested definition, found 0
./nova/api/openstack/compute/servers.py:104:23: E741 ambiguous variable name 'l'
./nova/db/sqlalchemy/migrate_repo/versions/330_enforce_mitaka_online_migrations.py:48:35: E711 comparison to None should be 'if cond is None:'
ERROR: InvocationError for command /bin/bash tools/flake8wrap.sh (exited with code 1)
pep8 finish: run-test after 70.95 seconds
pep8 start: run-test-post
pep8 finish: run-test-post after 0.00 seconds
___________________________________ summary ____________________________________
ERROR: pep8: commands failed

Brin Zhang (zhangbailin)
Changed in nova:
importance: Undecided → Low
status: New → Confirmed
assignee: nobody → Brin Zhang (zhangbailin)
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

hacking 3.0.0 is fixed with new version bump - https://review.opendev.org/#/c/727347/1

we can adopt hacking 3.1.0 as min version and adopt the new checks.

Revision history for this message
Brin Zhang (zhangbailin) wrote :

https://review.opendev.org/#/c/727589/8 this patch bumped hacking min version to 3.1.0, and fixed these pep8 issue.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/727589
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=61b99a1295c5208deef806b69ba74a7d031ad851
Submitter: Zuul
Branch: master

commit 61b99a1295c5208deef806b69ba74a7d031ad851
Author: zhangbailin <email address hidden>
Date: Wed May 13 10:15:20 2020 +0800

    Bump hacking min version to 3.1.0

    This has introduced a new version of pycodestyle, which has improved its
    parser to catch new corner cases and introduced some new tests.

    Closes-Bug: #1878317
    Change-Id: I853cf4dbd7ad6b7903a7f444f5c1da3f0fb21f77

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/ussuri)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/nova/+/768197
Reason: stable/ussuri branch of openstack/nova transitioned to End of Life and is about to be deleted. To be able to do that, all open patches need to be abandoned.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.