AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT' tht pep8 failures

Bug #1895093 reported by Michele Baldessari
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Michele Baldessari

Bug Description

Yesterday the tox jobs were switched to Ubuntu Focal (https://review.opendev.org/#/c/738322/) and now the tht tox fails with the following error (https://2ae1505794433bbd8632-ee26557ecac08e7f1d28df56ff28c0f0.ssl.cf1.rackcdn.com/750678/2/check/openstack-tox-pep8/fe6633d/job-output.txt):
2020-09-10 05:41:20.928647 | ubuntu-focal | File "/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.8/site-packages/pyflakes/checker.py", line 747, in handleChildren
2020-09-10 05:41:20.928671 | ubuntu-focal | self.handleNode(node, tree)
2020-09-10 05:41:20.928689 | ubuntu-focal | File "/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.8/site-packages/pyflakes/checker.py", line 793, in handleNode
2020-09-10 05:41:20.928707 | ubuntu-focal | handler = self.getNodeHandler(node.__class__)
2020-09-10 05:41:20.928736 | ubuntu-focal | File "/home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/lib/python3.8/site-packages/pyflakes/checker.py", line 627, in getNodeHandler
2020-09-10 05:41:20.928755 | ubuntu-focal | self._nodeHandlers[node_class] = handler = getattr(self, nodeType)
2020-09-10 05:41:20.928772 | ubuntu-focal | AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'
2020-09-10 05:41:21.007604 | ubuntu-focal | ERROR: InvocationError for command /home/zuul/src/opendev.org/openstack/tripleo-heat-templates/.tox/pep8/bin/flake8 --exclude releasenotes --ignore E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405,W503,W504,E501,E731,W605 (exited with code 1)
2020-09-10 05:41:21.007680 | ubuntu-focal | pep8 finish: run-test after 49.52 seconds
2020-09-10 05:41:21.007705 | ubuntu-focal | pep8 start: run-test-post
2020-09-10 05:41:21.007724 | ubuntu-focal | pep8 finish: run-test-post after 0.00 seconds
2020-09-10 05:41:21.007742 | ubuntu-focal | ___________________________________ summary ____________________________________
2020-09-10 05:41:21.007760 | ubuntu-focal | ERROR: pep8: commands failed
2020-09-10 05:41:21.007778 | ubuntu-focal | /home/zuul/.local/tox/lib/python3.8/site-packages/tox/config/__init__.py:642: UserWarning: conflicting basepython version (set 3.8, should be 3.7) for env 'py37';resolve conflict or set ignore_basepython_conflict
2020-09-10 05:41:21.007796 | ubuntu-focal | warnings.warn(
2020-09-10 05:41:21.271160 | ubuntu-focal | ERROR

Tags: ci
Changed in tripleo:
status: New → Triaged
importance: Undecided → High
tags: added: ci
yatin (yatinkarel)
Changed in tripleo:
milestone: none → victoria-3
Revision history for this message
Michele Baldessari (michele) wrote :

https://review.opendev.org/750890 let's see how that behaves

Changed in tripleo:
assignee: nobody → Michele Baldessari (michele)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.opendev.org/750890
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=87b365afd33f020226f608301954ebcb3dfab848
Submitter: Zuul
Branch: master

commit 87b365afd33f020226f608301954ebcb3dfab848
Author: Michele Baldessari <email address hidden>
Date: Thu Sep 10 09:26:21 2020 +0200

    Fix Flakes and lower-constraints errors

    With the switch to Ubuntu Focal for tox jobs via https://review.opendev.org/#/c/738322/
    our 1.1.0 version of hacking pulls in old modules that are not compatible
    with python3.8:
    https://github.com/openstack/hacking/blob/1.1.0/requirements.txt#L6

    Let's upgrade hacking to >= 3.0.1 and < 3.1.0 so that it supports python3.8
    correctly. The newer hacking also triggered new errors which are
    fixed in this review as well:
    ./tools/render-ansible-tasks.py:113:25: F841 local variable 'e' is assigned to but never used
    ./tools/yaml-validate.py:541:19: F999 '...'.format(...) has unused arguments at position(s): 2
    ./tools/render-ansible-tasks.py:126:1: E305 expected 2 blank lines after class or function definition, found 1
    ./tools/yaml-validate.py:33:1: E305 expected 2 blank lines after class or function definition, found 1
    ./container_config_scripts/tests/test_nova_statedir_ownership.py:35:1: E305 expected 2 blank lines after class or function definition, found 0

    Also make sure we exclude .tox and __pycache__ from flake8 as well

    We also need to change the lower-constraint requirements to make them
    py3.8 compatible. See https://bugs.launchpad.net/nova/+bug/1886298
    cffi==1.14.0
    greenlet==0.4.15
    MarkupSafe==1.1.0
    paramiko==2.7.1

    Suggested-By: Yatin Karel <email address hidden>

    Change-Id: Ic280ce9a51f26d165d4e93ba0dc0c47cdf8d7961
    Closes-Bug: #1895093

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common-tempest-plugin (master)

Fix proposed to branch: master
Review: https://review.opendev.org/759231

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common-tempest-plugin (master)

Reviewed: https://review.opendev.org/759231
Committed: https://git.openstack.org/cgit/openstack/tripleo-common-tempest-plugin/commit/?id=b8f886a1b3eec2c0ab63bbdc9e1a91147a4bafb2
Submitter: Zuul
Branch: master

commit b8f886a1b3eec2c0ab63bbdc9e1a91147a4bafb2
Author: likui <email address hidden>
Date: Thu Oct 22 17:34:58 2020 +0800

    Fix pep8 errors

    with the switch to Ubuntu Focal for tox jobs via https://review.opendev.org/#/c/738322/
    our 1.1.0 version of hacking pulls in old modules that are not compatible
    with python3.8:
    https://github.com/openstack/hacking/blob/1.1.0/requirements.txt#L6

    [1] https://review.opendev.org/#/c/750890/

    Change-Id: Icb4ef9f17ff7d033bb8cc8bed9eb8c87dc27ba22
    Closes-Bug: #1895093

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.