flake8 failing on ubuntu-focal zuul machine

Bug #1895054 reported by Don Penney on 2020-09-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Critical
Don Penney

Bug Description

Brief Description
-----------------
Zuul jobs running older flake8 (2.5.5, locked down by hacking==0.12.0) are failing on ubuntu-focal machines with the following error:
AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

This is causing Zuul failures in starlingx/utilities and starlingx/metal, for example:
https://review.opendev.org/750803
https://review.opendev.org/750805

Severity
--------
Critical

Steps to Reproduce
------------------
Can be reproduced by running tox in a ubuntu-focal container

Expected Behavior
------------------
flake8 should pass

Actual Behavior
----------------
older flake8 fails on python 3.8

Reproducibility
---------------
Reproducible, if zuul test runs on ubuntu-focal

Branch/Pull Time/Commit
-----------------------
master, as of Sept 9, 2020

Ghada Khalil (gkhalil) wrote :

Adding stx.3.0, 4.0 & 5.0 (master) tags as this issue will impact submissions to any of these branches.

Changed in starlingx:
importance: Undecided → Critical
assignee: nobody → Don Penney (dpenney)
tags: added: stx.3.0 stx.4.0 stx.5.0 stx.zuul

Reviewed: https://review.opendev.org/750813
Committed: https://git.openstack.org/cgit/starlingx/utilities/commit/?id=5bc7a33773e947eef8caeb3f371afa816fbcb774
Submitter: Zuul
Branch: master

commit 5bc7a33773e947eef8caeb3f371afa816fbcb774
Author: Don Penney <email address hidden>
Date: Wed Sep 9 17:12:45 2020 -0400

    Use newer flake8 to run on ubuntu-focal Zuul machines

    flake8 2.5.5 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    The update removes the hacking constraint to use newer flake8. This
    also ignores new warnings/errors, which should be addressed in a
    future update to remove the ignores.

    Change-Id: Ib24639adeea4da3063fb403a8e8484937f9e1a9f
    Partial-Bug: 1895054
    Signed-off-by: Don Penney <email address hidden>

Reviewed: https://review.opendev.org/750819
Committed: https://git.openstack.org/cgit/starlingx/metal/commit/?id=fcae730d65fe145e76a3d384360327a6b8f61c44
Submitter: Zuul
Branch: master

commit fcae730d65fe145e76a3d384360327a6b8f61c44
Author: Don Penney <email address hidden>
Date: Wed Sep 9 17:59:49 2020 -0400

    Use newer flake8 to run on ubuntu-focal Zuul machines

    flake8 3.5.0 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    The update removes the version constraint to use newer flake8. This
    also ignores new warnings/errors, which should be addressed in a
    future update to remove the ignores.

    Change-Id: I16dc579f7ee803881c42ff6048ddd2f6bb0c553b
    Partial-Bug: 1895054
    Signed-off-by: Don Penney <email address hidden>

Reviewed: https://review.opendev.org/751004
Committed: https://git.openstack.org/cgit/starlingx/stx-puppet/commit/?id=49de3e954e3187da34b43f2093d244bcb47127d1
Submitter: Zuul
Branch: master

commit 49de3e954e3187da34b43f2093d244bcb47127d1
Author: Don Penney <email address hidden>
Date: Thu Sep 10 10:27:53 2020 -0400

    Use newer flake8 to run on ubuntu-focal Zuul machines

    flake8 2.5.5 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    The update removes the version constraint to use newer flake8.

    Change-Id: I8f82c818fd9653da14f042fffa4acf304fd76789
    Partial-Bug: 1895054
    Signed-off-by: Don Penney <email address hidden>

Reviewed: https://review.opendev.org/752286
Committed: https://git.openstack.org/cgit/starlingx/ha/commit/?id=57225bb34ae5380c95dddd0e556847f7a17e3d61
Submitter: Zuul
Branch: master

commit 57225bb34ae5380c95dddd0e556847f7a17e3d61
Author: albailey <email address hidden>
Date: Wed Sep 16 13:01:03 2020 -0500

    Use newer flake8 to run on ubuntu-focal Zuul machines

    flake8 2.5.5 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    The update removes the version constraint to use newer flake8.

    The linters can be run in python3.
    Pylint cannot be run in python3 because mysql-python is not
    compatable, so a new zuul job for pylint is now added.

    The flake8 errors that the newer version raises are all suppressed,
    and some of them should be addressed by someone with familiarity in
    this repo.

    Change-Id: Ida6447728d4175173c02130cb04a6013e4f966f9
    Partial-Bug: 1895054
    Signed-off-by: albailey <email address hidden>

Reviewed: https://review.opendev.org/753445
Committed: https://git.openstack.org/cgit/starlingx/integ/commit/?id=f779502f5a216d094cb5277cab65f268aa08956c
Submitter: Zuul
Branch: master

commit f779502f5a216d094cb5277cab65f268aa08956c
Author: Steven Webster <email address hidden>
Date: Tue Sep 22 16:20:02 2020 -0400

    Use newer flake8 to run on ubuntu-focal Zuul machines

    flake8 3.6.0 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    The update removes the version constraint to use newer flake8. This
    also ignores new warnings/errors, which should be addressed in a
    future update to remove the ignores

    Change-Id: Id22fb14e2cce76c2f4f5234abb3be4db68c70555
    Partial-Bug: 1895054
    Signed-off-by: Steven Webster <email address hidden>

Reviewed: https://review.opendev.org/757417
Committed: https://git.openstack.org/cgit/starlingx/utilities/commit/?id=d29ed62e9e2413da3009b926aa3b274da516891a
Submitter: Zuul
Branch: f/centos8

commit d29ed62e9e2413da3009b926aa3b274da516891a
Author: Don Penney <email address hidden>
Date: Wed Sep 9 17:12:45 2020 -0400

    Use newer flake8 to run on ubuntu-focal Zuul machines

    flake8 2.5.5 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    The update removes the hacking constraint to use newer flake8. This
    also ignores new warnings/errors, which should be addressed in a
    future update to remove the ignores.

    Change-Id: Ib24639adeea4da3063fb403a8e8484937f9e1a9f
    Partial-Bug: 1895054
    Signed-off-by: Don Penney <email address hidden>

tags: added: in-f-centos8

Reviewed: https://review.opendev.org/761668
Committed: https://git.openstack.org/cgit/starlingx/monitoring/commit/?id=ee7ae99d4181293368fb1d5bce4e6e69ccffd815
Submitter: Zuul
Branch: master

commit ee7ae99d4181293368fb1d5bce4e6e69ccffd815
Author: albailey <email address hidden>
Date: Thu Nov 5 14:56:47 2020 -0600

    Use newer flake8 on python3.8 zuul systems

    flake8 2.5.5 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    Suppresses the following:
     W503 line break before binary operator
     W504 line break after binary operator
     W605 invalid escape sequence '\d'

     E117 over-indented
     E266 too many leading '#' for block comment
     E305 expected 2 blank lines after class or function definition, found 1
     E402 module level import not at top of file
     E722 do not use bare 'except'
     E741 ambiguous variable name 'I'

     F632 use ==/!= to compare constant literals
     F821 undefined name 'dpdk' (this is a flake8 bug)

    Change-Id: I6c2ef05d765b57b7be0b038d6e384cb2af589054
    Partial-Bug: 1895054
    Signed-off-by: albailey <email address hidden>

Reviewed: https://review.opendev.org/762907
Committed: https://git.openstack.org/cgit/starlingx/fault/commit/?id=42a9cfa8829dba61b78a4784c5dfbe582e53ec4f
Submitter: Zuul
Branch: master

commit 42a9cfa8829dba61b78a4784c5dfbe582e53ec4f
Author: albailey <email address hidden>
Date: Mon Nov 16 13:09:11 2020 -0600

    Use newer flake8 on python3.8 zuul systems

    flake8 2.5.5 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    Fixed:
     E117 over-indented
     E741 ambiguous variable name
     F841 local variable is assigned to but never used

    Per-Line-Suppressed:
     E402 module level import not at top of file
     F632 use ==/!= to compare constant literals

    Global Suppress:
     W504 line break after binary operator
     W605 invalid escape sequence

    The suppressed errors can be fixed by later submissions.

    Change-Id: I2df3ece427f0c84ce16c1a82f4d9f0c9a5a6982b
    Partial-Bug: 1895054
    Signed-off-by: albailey <email address hidden>

Change abandoned by Yong Fu (<email address hidden>) on branch: f/centos8
Review: https://review.opendev.org/762968

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

Other bug subscribers