openstack-tox-linters failing for tripleo-upgrade victoria branch

Bug #1967279 reported by Sandeep Yadav
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Sandeep Yadav

Bug Description

Description:-

openstack-tox-linters failing for tripleo-upgrade victoria branch

https://b32d03500643014759d0-c3c850383d3c4b677d9bd09df1596ea2.ssl.cf1.rackcdn.com/835689/1/check/openstack-tox-linters/5b962a2/job-output.txt
~~~
2022-03-30 17:58:06.244228 | ubuntu-focal | Flake8...................................................................Failed
2022-03-30 17:58:06.244292 | ubuntu-focal | hookid: flake8
2022-03-30 17:58:06.244315 | ubuntu-focal |
2022-03-30 17:58:06.244338 | ubuntu-focal | /home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pycodestyle.py:111: FutureWarning: Possible nested set at position 1
2022-03-30 17:58:06.244365 | ubuntu-focal | EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
2022-03-30 17:58:06.244385 | ubuntu-focal | Traceback (most recent call last):
2022-03-30 17:58:06.244403 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/bin/flake8", line 8, in <module>
2022-03-30 17:58:06.244422 | ubuntu-focal | sys.exit(main())
2022-03-30 17:58:06.244441 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/flake8/main.py", line 36, in main
2022-03-30 17:58:06.244461 | ubuntu-focal | report = flake8_style.check_files()
2022-03-30 17:58:06.244482 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/flake8/engine.py", line 181, in check_files
2022-03-30 17:58:06.244504 | ubuntu-focal | return self._retry_serial(self._styleguide.check_files, paths=paths)
2022-03-30 17:58:06.244525 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/flake8/engine.py", line 172, in _retry_serial
2022-03-30 17:58:06.244548 | ubuntu-focal | return func(*args, **kwargs)
2022-03-30 17:58:06.244568 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pycodestyle.py", line 1877, in check_files
2022-03-30 17:58:06.244591 | ubuntu-focal | runner(path)
2022-03-30 17:58:06.244611 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/flake8/engine.py", line 126, in input_file
2022-03-30 17:58:06.244633 | ubuntu-focal | return fchecker.check_all(expected=expected, line_offset=line_offset)
2022-03-30 17:58:06.244654 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pycodestyle.py", line 1608, in check_all
2022-03-30 17:58:06.244675 | ubuntu-focal | self.check_ast()
2022-03-30 17:58:06.244696 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pycodestyle.py", line 1554, in check_ast
2022-03-30 17:58:06.244719 | ubuntu-focal | checker = cls(tree, self.filename)
2022-03-30 17:58:06.244745 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/flake8/_pyflakes.py", line 62, in __init__
2022-03-30 17:58:06.244767 | ubuntu-focal | super(FlakesChecker, self).__init__(tree, filename,
2022-03-30 17:58:06.244786 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pyflakes/checker.py", line 425, in __init__
2022-03-30 17:58:06.244806 | ubuntu-focal | self.handleChildren(tree)
2022-03-30 17:58:06.244826 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pyflakes/checker.py", line 747, in handleChildren
2022-03-30 17:58:06.244847 | ubuntu-focal | self.handleNode(node, tree)
2022-03-30 17:58:06.244869 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pyflakes/checker.py", line 794, in handleNode
2022-03-30 17:58:06.244890 | ubuntu-focal | handler(node)
2022-03-30 17:58:06.244911 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pyflakes/checker.py", line 747, in handleChildren
2022-03-30 17:58:06.244934 | ubuntu-focal | self.handleNode(node, tree)
2022-03-30 17:58:06.244955 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pyflakes/checker.py", line 794, in handleNode
2022-03-30 17:58:06.244977 | ubuntu-focal | handler(node)
2022-03-30 17:58:06.244999 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pyflakes/checker.py", line 747, in handleChildren
2022-03-30 17:58:06.245040 | ubuntu-focal | self.handleNode(node, tree)
2022-03-30 17:58:06.245063 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pyflakes/checker.py", line 794, in handleNode
2022-03-30 17:58:06.245085 | ubuntu-focal | handler(node)
2022-03-30 17:58:06.245106 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pyflakes/checker.py", line 747, in handleChildren
2022-03-30 17:58:06.245127 | ubuntu-focal | self.handleNode(node, tree)
2022-03-30 17:58:06.245147 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pyflakes/checker.py", line 794, in handleNode
2022-03-30 17:58:06.245168 | ubuntu-focal | handler(node)
2022-03-30 17:58:06.245187 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pyflakes/checker.py", line 1133, in TUPLE
2022-03-30 17:58:06.245205 | ubuntu-focal | self.handleChildren(node)
2022-03-30 17:58:06.245222 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pyflakes/checker.py", line 747, in handleChildren
2022-03-30 17:58:06.245242 | ubuntu-focal | self.handleNode(node, tree)
2022-03-30 17:58:06.245263 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pyflakes/checker.py", line 793, in handleNode
2022-03-30 17:58:06.245284 | ubuntu-focal | handler = self.getNodeHandler(node.__class__)
2022-03-30 17:58:06.245304 | ubuntu-focal | File "/home/zuul/.cache/pre-commit/repottbab6nt/py_env-python3.8/lib/python3.8/site-packages/pyflakes/checker.py", line 627, in getNodeHandler
2022-03-30 17:58:06.245336 | ubuntu-focal | self._nodeHandlers[node_class] = handler = getattr(self, nodeType)
2022-03-30 17:58:06.245358 | ubuntu-focal | AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'
2022-03-30 17:58:06.245378 | ubuntu-focal |
~~~

In last good runs, looks like this check was skipped:-

https://8f916be78216e964d9a4-88701ef6bf8de11ee3b199ef1b631f6f.ssl.cf2.rackcdn.com/834146/1/check/openstack-tox-linters/bec0191/job-output.txt

~~~
2022-03-18 07:50:56.092618 | ubuntu-focal | Flake8...............................................(no files to check)Skipped
~~~

Steps to reproduce:-

1) Make any change in setup.py
2) git commit
3) tox -e linters

Looks like we need similar patch for victoria branch:

https://github.com/openstack/tripleo-upgrade/commit/523d09a801947685f17fc6e43fd550efcf23e832

Changed in tripleo:
assignee: nobody → Sandeep Yadav (sandeepyadav93)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-upgrade (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/tripleo-upgrade/+/835972

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-upgrade (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/tripleo-upgrade/+/835972
Committed: https://opendev.org/openstack/tripleo-upgrade/commit/6a6d0b1e6d97d8eeef8849a960d6fb65e0422f96
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 6a6d0b1e6d97d8eeef8849a960d6fb65e0422f96
Author: Sergii Golovatiuk <email address hidden>
Date: Thu Jun 24 14:50:22 2021 +0200

    Disable auto discovery& Remove deps from precommit

    This dependency breaks Centos8/Ubuntu Focal testing as these OSes use
    python 3.8.

    Also, add .pre-commit-config.yaml in irrelevant-files, we already have
    this in wallaby and above[0]

    Also, cherry-picks 13d7a4c60ed6d40b4354370f36b916caf7e21c2a to
    Disable auto discovery

    Tripleo-ci jobs are broken after latest release of setuptools 61.0
    because of breaking changes which are not backwork compatible,
    details in related bug and [1].

    Users that don't set ``packages``, ``py_modules``, or ``configuration`` are
    still likely to observe the auto-discovery behavior, which may halt the
    build if the project contains multiple directories and/or multiple Python
    files directly under the project root.

    To disable auto discovery, one can do below in setup.py

    ~~~
    setuptools.setup(..,packages=[],..)
    ~~~

    or

    ~~~
    setuptools.setup(..,py_modules=[],..)
    ~~~

    Also, adding ^setup.*$ under irrelevant-files as content-provider
    parent[2] also have same.

    [0] https://github.com/openstack/tripleo-upgrade/commit/da2dd1e548e3236940309ea400a528602f12800b
    [1] https://github.com/pypa/setuptools/issues/3197
    [2] https://opendev.org/openstack/tripleo-ci/src/branch/master/zuul.d/base-upstream.yaml#L92

    Related-Bug: #1966382
    Releated-Bug: #1967279
    Change-Id: I518be6cdba50d9bd48b3328e19cc89432f1b89b1
    (cherry picked from commit 523d09a801947685f17fc6e43fd550efcf23e832)

tags: added: in-stable-victoria
Rabi Mishra (rabi)
Changed in tripleo:
status: Triaged → Fix Released
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.