Comment 0 for bug 2031439

Revision history for this message
Corey Bryant (corey.bryant) wrote : lunar+ build / install failures

Charm build on master is failing due to jsonschema->rpds-py->rust:
https://launchpadlibrarian.net/682124658/buildlog_charm_ubuntu_lunar_ppc64el_charm-ovn-chassis.master.latest_BUILDING.txt.gz

(This is from https://launchpad.net/~openstack-charmers/charm-ovn-chassis/+charm/charm-ovn-chassis.master.latest)

For some reason, I wasn't able to recreate this locally when building for lunar using the same charmcraft version (2.4.0).

Regardless I built with what I think is the fix, by pinning jsonschema in charm-ovn-chassis/src/wheelhouse.txt:
 jsonschema<4.18.0 # jsonschema 4.18.0 depends on Rust (via rpds-py)

^ This would offically get fixed in layer-ovn:

:: charmtools.build.tactics: # layer:ovn
:: charmtools.build.tactics: jsonschema

Deploying that newly build charm resulted in:

2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 Traceback (most recent call last):
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/charm/hooks/install", line 8, in <module>
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 basic.bootstrap_charm_deps()
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/charm/lib/charms/layer/basic.py", line 123, in bootstrap_charm_deps
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 activate_venv()
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/charm/lib/charms/layer/basic.py", line 421, in activate_venv
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 layer.import_layer_libs()
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/charm/lib/charms/layer/__init__.py", line 24, in import_layer_libs
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 import_module('charms.layer.{}'.format(module_name))
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 return _bootstrap._gcd_import(name[level:], package, level)
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "<frozen importlib._bootstrap_external>", line 940, in exec_module
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/charm/lib/charms/layer/snap.py", line 20, in <module>
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 import tenacity
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/.venv/lib/python3.11/site-packages/tenacity/__init__.py", line 450, in <module>
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 from tenacity._asyncio import AsyncRetrying
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/.venv/lib/python3.11/site-packages/tenacity/_asyncio.py", line 28, in <module>
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 class AsyncRetrying(BaseRetrying):
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 File "/var/lib/juju/agents/unit-ovn-central-1/.venv/lib/python3.11/site-packages/tenacity/_asyncio.py", line 36, in AsyncRetrying
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 @asyncio.coroutine
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 ^^^^^^^^^^^^^^^^^
2023-08-15 19:09:33 WARNING unit.ovn-central/1.install logger.go:60 AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?

Looking back at the charm build, tenacity is pinned by layer snap:

:: charmtools.build.tactics: # layer:snap
:: charmtools.build.tactics: # Newer versions of tenacity rely on `typing` which is in stdlib in
:: charmtools.build.tactics: # python3.5 but not python3.4. We want to continue to support
:: charmtools.build.tactics: # python3.4 (Trusty)
:: charmtools.build.tactics: tenacity<5.0.4

layer-ovn pulls in layer snap:

https://github.com/openstack-charmers/charm-layer-ovn/blob/master/layer.yaml#L4C5-L4C15

which pins tenacity at:

https://git.launchpad.net/layer-snap/tree/wheelhouse.txt

It looks like the coroutine error is fixed in a newer release of tenacity, but we would need to change the pin in layer snap to pick that up.