ERROR: Could not find a version that satisfies the requirement pyaml==23.5.9 (from versions: 23.5.9)

Bug #2020788 reported by Felipe Reyes
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Ironic API Charm
Invalid
Undecided
Unassigned
OpenStack Magnum Charm
Invalid
Undecided
Unassigned

Bug Description

Issue when building with newer version of pyaml and probably newer version of pip/setuptools since they have become more strict over time with the versioning of packages

```
'
2023-05-25 01:25:13.159460 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:51 DEBUG unit.magnum/2.install logger.go:60 Processing ./wheelhouse/pyaml-23.5.9.tar.gz
2023-05-25 01:25:13.159476 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:52 DEBUG unit.magnum/2.install logger.go:60 Installing build dependencies: started
2023-05-25 01:25:13.159485 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:55 DEBUG unit.magnum/2.install logger.go:60 Installing build dependencies: finished with status 'done'
2023-05-25 01:25:13.159494 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:55 DEBUG unit.magnum/2.install logger.go:60 Getting requirements to build wheel: started
2023-05-25 01:25:13.159549 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 DEBUG unit.magnum/2.install logger.go:60 Getting requirements to build wheel: finished with status 'done'
2023-05-25 01:25:13.159570 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 DEBUG unit.magnum/2.install logger.go:60 Preparing metadata (pyproject.toml): started
2023-05-25 01:25:13.159579 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 DEBUG unit.magnum/2.install logger.go:60 Preparing metadata (pyproject.toml): finished with status 'done'
2023-05-25 01:25:13.159588 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 WARNING unit.magnum/2.install logger.go:60 WARNING: Generating metadata for package pyaml produced metadata for project name unknown. Fix your #egg=pyaml fragments.
2023-05-25 01:25:13.159842 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 DEBUG unit.magnum/2.install logger.go:60 Discarding file:///var/lib/juju/agents/unit-magnum-2/charm/wheelhouse/pyaml-23.5.9.tar.gz: Requested unknown from file:///var/lib/juju/agents/unit-magnum-2/charm/wheelhouse/pyaml-23.5.9.tar.gz has inconsistent name: filename has 'pyaml', but metadata has 'unknown'
2023-05-25 01:25:13.159897 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 WARNING unit.magnum/2.install logger.go:60 ERROR: Could not find a version that satisfies the requirement pyaml==23.5.9 (from versions: 23.5.9)
2023-05-25 01:25:13.159921 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 WARNING unit.magnum/2.install logger.go:60 ERROR: No matching distribution found for pyaml==23.5.9
2023-05-25 01:25:13.159940 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 WARNING unit.magnum/2.install logger.go:60 Traceback (most recent call last):
2023-05-25 01:25:13.159957 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 WARNING unit.magnum/2.install logger.go:60 File "/var/lib/juju/agents/unit-magnum-2/charm/hooks/install", line 8, in <module>
2023-05-25 01:25:13.160281 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 WARNING unit.magnum/2.install logger.go:60 basic.bootstrap_charm_deps()
2023-05-25 01:25:13.160312 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 WARNING unit.magnum/2.install logger.go:60 File "/var/lib/juju/agents/unit-magnum-2/charm/lib/charms/layer/basic.py", line 226, in bootstrap_charm_deps
2023-05-25 01:25:13.160322 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 WARNING unit.magnum/2.install logger.go:60 check_call([pip, 'install', '-U', reinstall_flag, '--no-index',
2023-05-25 01:25:13.160332 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 WARNING unit.magnum/2.install logger.go:60 File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
2023-05-25 01:25:13.160340 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 WARNING unit.magnum/2.install logger.go:60 raise CalledProcessError(retcode, cmd)
2023-05-25 01:25:13.160597 | focal-medium | 2023-05-25 01:25:13 [ERROR] unit-magnum-2.log: 2023-05-25 01:24:56 WARNING unit.magnum/2.install logger.go:60 subprocess.CalledProcessError: Command '['/var/lib/juju/agents/unit-magnum-2/.venv/bin/pip', 'install', '-U', '--force-reinstall', '--no-index', '--no-cache-dir', '-f', 'wheelhouse', 'flit-core==3.9.0', 'Jinja2==3.1.2', 'charms.reactive==1.5.2', 'Cython==0.29.34', 'charms.openstack==0.0.1.dev1', 'packaging==23.1', 'PyYAML==6.0', 'psutil==5.9.5', 'pyaml==23.5.9', 'netaddr==0.7.19', 'tomli==2.0.1', 'dnspython==2.3.0', 'pbr==5.11.1', 'netifaces==0.11.0', 'charmhelpers==1.1.1.dev72', 'poetry-core==1.6.0']' returned non-zero exit status 1.
```

Changed in charm-ironic-api:
status: New → In Progress
Revision history for this message
Felipe Reyes (freyes) wrote :

I wonder if this pinning should be done in layer-basic(?)

Revision history for this message
Felipe Reyes (freyes) wrote :

the stable/2023.1 branch pinned pyaml to 21.10.1

```
    {
      "type": "python_module",
      "package": "pyaml",
      "vcs": null,
      "version": "21.10.1"
    },
```

Revision history for this message
Felipe Reyes (freyes) wrote :
Revision history for this message
Felipe Reyes (freyes) wrote :

I was trying to reproduce the issue in isolation without success:

```
virtualenv --pip '23.0.1' --setuptools '66.1.1' test
source test/bin/activate
mkdir wheelhouse
pip download --no-binary ':all:' -d wheelhouse/ pyaml 'setuptools==66.1.1' 'wheel==0.38.4' 'Cython==0.29.34'
pip install -U --force-reinstall --no-index --no-cache-dir -f wheelhouse/ 'pyaml==23.5.9'
```

This is the output:

```
Looking in links: wheelhouse/
Processing ./wheelhouse/pyaml-23.5.9.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Processing ./wheelhouse/PyYAML-6.0.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyaml, PyYAML
  Building wheel for pyaml (pyproject.toml) ... done
  Created wheel for pyaml: filename=pyaml-23.5.9-py3-none-any.whl size=17241 sha256=b246b484bfa2afc4c9c973e52ddf8e20922420b4c4ccca7854f90743dfc3694a
  Stored in directory: /tmp/pip-ephem-wheel-cache-lq4lpbuk/wheels/99/53/cc/4e7160ddfa50bcb846cb83743590bf43749659d71df1c1def4
  Building wheel for PyYAML (pyproject.toml) ... done
  Created wheel for PyYAML: filename=PyYAML-6.0-cp311-cp311-linux_x86_64.whl size=513655 sha256=f6bfec7a136bfdad512be01e0bc3c556a958d168a062909ef7383b7395f917c3
  Stored in directory: /tmp/pip-ephem-wheel-cache-lq4lpbuk/wheels/52/5d/aa/6e65c5c0a2a11e8d5b652b2c19789d6d9790e81f99b57c6457
Successfully built pyaml PyYAML
Installing collected packages: PyYAML, pyaml
Successfully installed PyYAML-6.0 pyaml-23.5.9
```

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-ironic-api (master)

Change abandoned by "Felipe Reyes <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/charm-ironic-api/+/884266
Reason: Fixed in layer-basic https://github.com/juju-solutions/layer-basic/pull/216

Revision history for this message
Felipe Reyes (freyes) wrote :
Changed in charm-ironic-api:
status: In Progress → Invalid
Changed in charm-magnum:
status: New → Invalid
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.