tox-linters jobs failing with AttributeError

Bug #1878150 reported by Rabi Mishra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Sorin Sbarnea

Bug Description

Looks like setuptools >=41.4.0 don't work with ansible-lint

(venv) [ramishra@ramishra-laptop tripleo-common]$ tox -elinters
/usr/lib/python3.8/site-packages/tox/config/__init__.py:592: UserWarning: conflicting basepython version (set 3.8, should be 3.7) for env 'py37';resolve conflict or set ignore_basepython_conflict
  warnings.warn(
linters installed: cfgv==3.1.0,identify==1.4.15,nodeenv==1.3.5,pre-commit==2.4.0,PyYAML==5.3.1,toml==0.10.0,virtualenv==16.3.0
linters run-test-pre: PYTHONHASHSEED='4233023659'
linters run-test: commands[0] | python -m pre_commit run -a
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://gitlab.com/pycqa/flake8.git.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/ansible/ansible-lint.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/ramishra/.cache/pre-commit/repol54w0h4h/py_env-python3.8/bin/python', '-mpip', 'install', '.')
return code: 1
expected return code: 0
stdout:
    Processing /home/ramishra/.cache/pre-commit/repol54w0h4h

stderr:
        ERROR: Command errored out with exit status 1:
         command: /home/ramishra/.cache/pre-commit/repol54w0h4h/py_env-python3.8/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/ramishra/.cache/pre-commit/repol54w0h4h/setup.py'"'"'; __file__='"'"'/home/ramishra/.cache/pre-commit/repol54w0h4h/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ncxxcbrf
             cwd: /home/ramishra/.cache/pre-commit/repol54w0h4h/
        Complete output (21 lines):
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/home/ramishra/.cache/pre-commit/repol54w0h4h/setup.py", line 150, in <module>
            __name__ == '__main__' and setuptools.setup(**setup_params)
          File "/home/ramishra/.cache/pre-commit/repol54w0h4h/py_env-python3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
            return distutils.core.setup(**attrs)
          File "/usr/lib64/python3.8/distutils/core.py", line 108, in setup
            _setup_distribution = dist = klass(attrs)
          File "/home/ramishra/.cache/pre-commit/repol54w0h4h/py_env-python3.8/lib/python3.8/site-packages/setuptools/dist.py", line 425, in __init__
            _Distribution.__init__(self, {
          File "/usr/lib64/python3.8/distutils/dist.py", line 292, in __init__
            self.finalize_options()
          File "/home/ramishra/.cache/pre-commit/repol54w0h4h/py_env-python3.8/lib/python3.8/site-packages/setuptools/dist.py", line 717, in finalize_options
            ep(self)
          File "/home/ramishra/.cache/pre-commit/repol54w0h4h/py_env-python3.8/lib/python3.8/site-packages/setuptools/dist.py", line 724, in _finalize_setup_keywords
            ep.load()(self, ep.name, value)
          File "/home/ramishra/.cache/pre-commit/repol54w0h4h/py_env-python3.8/lib/python3.8/site-packages/setuptools/dist.py", line 289, in check_specifier
            packaging.specifiers.SpecifierSet(value)
          File "/home/ramishra/.cache/pre-commit/repol54w0h4h/py_env-python3.8/lib/python3.8/site-packages/setuptools/_vendor/packaging/specifiers.py", line 572, in __init__
            specifiers = [s.strip() for s in specifiers.split(",") if s.strip()]
        AttributeError: 'SpecifierSet' object has no attribute 'split'
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Revision history for this message
Rabi Mishra (rabi) wrote :
Changed in tripleo:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Sorin Sbarnea (ssbarnea) wrote :

AFAIK it works, but for start please do some testing by upgrading: pre-commit, setuptools and ansible-lint, one at a time.

Looking at the exception this is unrelated to ansible-lint, is an exception raised by setuptools itself.'

Hint: I seen pre-commit making a new release few days ago where they mentioned something related to py38.

Changed in tripleo:
assignee: nobody → Sorin Sbarnea (ssbarnea)
status: Triaged → In Progress
Revision history for this message
wes hayutin (weshayutin) wrote :
Changed in tripleo:
milestone: none → ussuri-rc3
Revision history for this message
wes hayutin (weshayutin) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.opendev.org/727113
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=cb497e83f954a4e7cc36d7a832da9c03d5085a0f
Submitter: Zuul
Branch: master

commit cb497e83f954a4e7cc36d7a832da9c03d5085a0f
Author: Sorin Sbarnea <email address hidden>
Date: Tue May 12 09:42:53 2020 +0100

    linters refresh w/ afferent bugfixes

    - removes ansible-lint as we have no ansible files here
    - bumps linter versions
    - fixes newly found errors
    - return to more interesting work

    Change-Id: Iaaf0a850c8429fe041a595028cbc31b9ff0fb9e5
    Partial-Bug: #1878150

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/727569

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

Reviewed: https://review.opendev.org/727569
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=babb9afd3d778844dbb21398baeb7ea8e3426d98
Submitter: Zuul
Branch: stable/train

commit babb9afd3d778844dbb21398baeb7ea8e3426d98
Author: Sorin Sbarnea <email address hidden>
Date: Tue May 12 09:42:53 2020 +0100

    linters refresh w/ afferent bugfixes

    - removes ansible-lint as we have no ansible files here
    - bumps linter versions
    - fixes newly found errors
    - return to more interesting work

    Change-Id: Iaaf0a850c8429fe041a595028cbc31b9ff0fb9e5
    Partial-Bug: #1878150
    (cherry picked from commit cb497e83f954a4e7cc36d7a832da9c03d5085a0f)

tags: added: in-stable-train
wes hayutin (weshayutin)
Changed in tripleo:
milestone: ussuri-rc3 → victoria-1
Changed in tripleo:
milestone: victoria-1 → victoria-3
Changed in tripleo:
milestone: victoria-3 → wallaby-1
Changed in tripleo:
milestone: wallaby-1 → wallaby-2
Changed in tripleo:
milestone: wallaby-2 → wallaby-3
Changed in tripleo:
milestone: wallaby-3 → wallaby-rc1
Sorin Sbarnea (ssbarnea)
Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
Marios Andreou (marios-b) wrote :

14:50 < zbr|rover> marios: I think https://bugs.launchpad.net/tripleo/+bug/1878150 should be closed as fixed, i
                   am sure we would be on RED if it was not.

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.