openstack-tox-linters fails on validations-common due to non-compliant version syntax of yamllint

Bug #2013048 reported by Jiri Podivin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Jiri Podivin

Bug Description

Syntax used by yamllint to define dependency version is not compliant with PEP440[0], causing the installation process to fail if initialized under python3.10.

[0]https://peps.python.org/pep-0440/

Logs:
=====
https://zuul.opendev.org/t/openstack/build/2690e3820e0640ca8cf7b36062cb1257

Trace:
======
[INFO] Installing environment for https://github.com/adrienverge/yamllint.git.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/zuul/src/opendev.org/openstack/validations-common/.tox/linters/.cache/pre-commit/repo4m43o6t6/py_env-python3.10/bin/python', '-mpip', 'install', '.')
return code: 1
stdout:
    Looking in indexes: https://mirror.gra1.ovh.opendev.org/pypi/simple, https://mirror.gra1.ovh.opendev.org/wheel/ubuntu-22.04-x86_64
    Processing /home/zuul/src/opendev.org/openstack/validations-common/.tox/linters/.cache/pre-commit/repo4m43o6t6
      Preparing metadata (setup.py): started
      Preparing metadata (setup.py): finished with status 'error'
stderr:
      error: subprocess-exited-with-error

      × python setup.py egg_info did not run successfully.

      │ exit code: 1
      ╰─> [26 lines of output]
          Traceback (most recent call last):
            File "<string>", line 2, in <module>
            File "<pip-setuptools-caller>", line 34, in <module>
            File "/home/zuul/src/opendev.org/openstack/validations-common/.tox/linters/.cache/pre-commit/repo4m43o6t6/setup.py", line 23, in <module>
              setup(
            File "/home/zuul/src/opendev.org/openstack/validations-common/.tox/linters/.cache/pre-commit/repo4m43o6t6/py_env-python3.10/lib/python3.10/site-packages/setuptools/__init__.py", line 108, in setup
              return distutils.core.setup(**attrs)
            File "/home/zuul/src/opendev.org/openstack/validations-common/.tox/linters/.cache/pre-commit/repo4m43o6t6/py_env-python3.10/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 159, in setup
              dist.parse_config_files()
            File "/home/zuul/src/opendev.org/openstack/validations-common/.tox/linters/.cache/pre-commit/repo4m43o6t6/py_env-python3.10/lib/python3.10/site-packages/_virtualenv.py", line 21, in parse_config_files
              result = old_parse_config_files(self, *args, **kwargs)
            File "/home/zuul/src/opendev.org/openstack/validations-common/.tox/linters/.cache/pre-commit/repo4m43o6t6/py_env-python3.10/lib/python3.10/site-packages/setuptools/dist.py", line 881, in parse_config_files
              setupcfg.parse_configuration(
            File "/home/zuul/src/opendev.org/openstack/validations-common/.tox/linters/.cache/pre-commit/repo4m43o6t6/py_env-python3.10/lib/python3.10/site-packages/setuptools/config/setupcfg.py", line 163, in parse_configuration
              options.parse()
            File "/home/zuul/src/opendev.org/openstack/validations-common/.tox/linters/.cache/pre-commit/repo4m43o6t6/py_env-python3.10/lib/python3.10/site-packages/setuptools/config/setupcfg.py", line 508, in parse
              section_parser_method(section_options)
            File "/home/zuul/src/opendev.org/openstack/validations-common/.tox/linters/.cache/pre-commit/repo4m43o6t6/py_env-python3.10/lib/python3.10/site-packages/setuptools/config/setupcfg.py", line 482, in parse_section
              self[name] = value
            File "/home/zuul/src/opendev.org/openstack/validations-common/.tox/linters/.cache/pre-commit/repo4m43o6t6/py_env-python3.10/lib/python3.10/site-packages/setuptools/config/setupcfg.py", line 290, in __setitem__
              value = parser(value)
            File "/home/zuul/src/opendev.org/openstack/validations-common/.tox/linters/.cache/pre-commit/repo4m43o6t6/py_env-python3.10/lib/python3.10/site-packages/setuptools/_vendor/packaging/specifiers.py", line 711, in __init__
              parsed.add(Specifier(specifier))
            File "/home/zuul/src/opendev.org/openstack/validations-common/.tox/linters/.cache/pre-commit/repo4m43o6t6/py_env-python3.10/lib/python3.10/site-packages/setuptools/_vendor/packaging/specifiers.py", line 245, in __init__
              raise InvalidSpecifier(f"Invalid specifier: '{spec}'")
          setuptools.extern.packaging.specifiers.InvalidSpecifier: Invalid specifier: '>=3.5.*'
          [end of output]

      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: metadata-generation-failed

Tags: ci
Jiri Podivin (jpodivin)
Changed in tripleo:
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to validations-common (master)
Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to validations-common (master)

Reviewed: https://review.opendev.org/c/openstack/validations-common/+/878755
Committed: https://opendev.org/openstack/validations-common/commit/445eecf39878c2ca4937bf10cec6553b477cf9ae
Submitter: "Zuul (22348)"
Branch: master

commit 445eecf39878c2ca4937bf10cec6553b477cf9ae
Author: Jiri Podivin <email address hidden>
Date: Tue Mar 28 11:59:41 2023 +0200

    Bumping yamllint to 1.30.0

    This change should allow openstack-tox-linters run under python 3.10 envs.

    Closes-Bug: #2013048

    Signed-off-by: Jiri Podivin <email address hidden>
    Change-Id: Ice5af1abccf448fe4f3d420eeb457f52af4f22cb

Changed in tripleo:
status: In Progress → 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.