openstack-tox-py37 is failing on tripleo-ansible jobs (train branch) - setuptools error

Bug #1962232 reported by Ronelle Landy
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
networking-ovn
Fix Committed
Undecided
Fernando Royo
tripleo
Fix Released
Critical
Unassigned

Bug Description

openstack-tox-py37 tests are failing on tripleo-ansible jobs run on the train branch with the following error:

2022-02-24 21:40:44.981541 | ubuntu-bionic | File "<pip-setuptools-caller>", line 14, in <module>
2022-02-24 21:40:44.981567 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-ansible/.tox/py37/lib/python3.7/site-packages/setuptools/__init__.py", line 18, in <module>
2022-02-24 21:40:44.981595 | ubuntu-bionic | from setuptools.dist import Distribution
2022-02-24 21:40:44.981622 | ubuntu-bionic | File "<frozen importlib._bootstrap>", line 983, in _find_and_load
2022-02-24 21:40:44.981637 | ubuntu-bionic | File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
2022-02-24 21:40:44.981650 | ubuntu-bionic | File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
2022-02-24 21:40:44.981663 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-ansible/.tox/py37/lib/python3.7/site-packages/_virtualenv.py", line 89, in exec_module
2022-02-24 21:40:44.981677 | ubuntu-bionic | old(module)
2022-02-24 21:40:44.981690 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-ansible/.tox/py37/lib/python3.7/site-packages/setuptools/dist.py", line 33, in <module>
2022-02-24 21:40:44.981703 | ubuntu-bionic | from ._importlib import metadata
2022-02-24 21:40:44.981716 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-ansible/.tox/py37/lib/python3.7/site-packages/setuptools/_importlib.py", line 28, in <module>
2022-02-24 21:40:44.981729 | ubuntu-bionic | disable_importlib_metadata_finder(metadata)
2022-02-24 21:40:44.981742 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-ansible/.tox/py37/lib/python3.7/site-packages/setuptools/_importlib.py", line 12, in disable_importlib_metadata_finder
2022-02-24 21:40:44.981755 | ubuntu-bionic | import importlib_metadata
2022-02-24 21:40:44.981768 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-ansible/.tox/py37/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 490, in <module>
2022-02-24 21:40:44.981802 | ubuntu-bionic | __version__ = version(__name__)
2022-02-24 21:40:44.981817 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-ansible/.tox/py37/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 457, in version
2022-02-24 21:40:44.981829 | ubuntu-bionic | return distribution(package).version
2022-02-24 21:40:44.981843 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-ansible/.tox/py37/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 430, in distribution
2022-02-24 21:40:44.981874 | ubuntu-bionic | return Distribution.from_name(package)
2022-02-24 21:40:44.981900 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-ansible/.tox/py37/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 179, in from_name
2022-02-24 21:40:44.981930 | ubuntu-bionic | dists = resolver(name)
2022-02-24 21:40:44.981956 | ubuntu-bionic | File "/home/zuul/src/opendev.org/openstack/tripleo-ansible/.tox/py37/lib/python3.7/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 886, in find_distributions
2022-02-24 21:40:44.981980 | ubuntu-bionic | found = self._search_paths(context.name, context.path)
2022-02-24 21:40:44.981994 | ubuntu-bionic | AttributeError: 'str' object has no attribute 'name'
2022-02-24 21:40:44.982007 | ubuntu-bionic | [end of output]
2022-02-24 21:40:44.982020 | ubuntu-bionic |

There is a related issues open for setuptools:

https://github.com/pypa/setuptools/issues/3113

The job history is linked below:

https://zuul.opendev.org/t/openstack/builds?job_name=openstack-tox-py37&project=openstack%2Ftripleo-ansible&branch=stable%2Ftrain&skip=0

Passing jobs have setuptools==60.6.0
Failing jobs have setuptools==60.9.3

Revision history for this message
Ronelle Landy (rlandy) wrote :

https://opendev.org/openstack/requirements/src/branch/master/upper-constraints.txt#L640 has

setuptools===59.6.0;python_version=='3.6'
setuptools===60.9.3;python_version=='3.8'

while the train version:

https://opendev.org/openstack/requirements/src/branch/stable/train/upper-constraints.txt

has no setuptools version set.

Changed in tripleo:
milestone: none → yoga-2
importance: Undecided → Critical
status: New → Triaged
tags: added: promotion-blocker
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ansible (stable/train)

Related fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/830914

Changed in networking-ovn:
assignee: nobody → Fernando Royo (froyoredhat)
status: New → Fix Committed
Revision history for this message
Fernando Royo (froyoredhat) wrote :
Ronelle Landy (rlandy)
Changed in tripleo:
status: Triaged → Fix Released
Revision history for this message
Rabi Mishra (rabi) wrote :

Are we sure it's fixed? See the last job failure that uses that requirements patch. We need https://review.opendev.org/c/openstack/tripleo-ansible/+/831104

2022-02-27 15:51:11.811320 | ubuntu-bionic | Switched to branch 'stable/train'
2022-02-27 15:51:11.811422 | ubuntu-bionic | opendev.org/openstack/requirements checked out to:
2022-02-27 15:51:11.811514 | ubuntu-bionic | ef77a2ae95debb2be64598c1c624d5d4e08b4cdb Set setuptools for different python version

https://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_01a/830736/2/check/openstack-tox-py37/01a6cf5/job-output.txt

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

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/831104
Committed: https://opendev.org/openstack/tripleo-ansible/commit/561359b01ddfc0546e589e5e76ce55a205dc7df8
Submitter: "Zuul (22348)"
Branch: stable/train

commit 561359b01ddfc0546e589e5e76ce55a205dc7df8
Author: rabi <email address hidden>
Date: Sun Feb 27 21:45:32 2022 +0530

    Don't use install_command with tox

    When tox py37 target is called, first it installs the dependencies
    (listed in 'deps') in 'installdeps' phase, then it installs
    tripleo-ansible with install_command in 'develop-inst' phase.
    And installdeps phase would install the wrong setuptools not
    constrained with uc[1] and hence the failure.

    Also, adds setuptools to requirements.

    [1] https://review.opendev.org/c/openstack/requirements/+/830960

    Related-Bug: #1962232
    Change-Id: I5b23a7649a4061dae3bc24a947022b027d95458e

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-ansible (stable/train)

Change abandoned by "Kevin Carter <email address hidden>" on branch: stable/train
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/830914

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.