Add support for noble
Closed this issue · 3 comments
Description
Pylibjuju doesn't support noble yet, per https://github.com/juju/python-libjuju/blob/master/juju/utils.py#L305.
Failing test run available here. Traceback for posterity in case the run expires:
____________________________ test_build_and_deploy _____________________________
Traceback (most recent call last):
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/_pytest/runner.py", line 341, in from_call
result: Optional[TResult] = func()
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/_pytest/runner.py", line 241, in <lambda>
lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_hooks.py", line 513, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_callers.py", line 139, in _multicall
raise exception.with_traceback(exception.__traceback__)
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/_pytest/threadexception.py", line 87, in pytest_runtest_call
yield from thread_exception_runtest_hook()
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/_pytest/threadexception.py", line 63, in thread_exception_runtest_hook
yield
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/_pytest/unraisableexception.py", line 90, in pytest_runtest_call
yield from unraisable_exception_runtest_hook()
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/_pytest/unraisableexception.py", line 65, in unraisable_exception_runtest_hook
yield
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/_pytest/logging.py", line 850, in pytest_runtest_call
yield from self._runtest_for(item, "call")
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/_pytest/logging.py", line 833, in _runtest_for
yield
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/_pytest/capture.py", line 878, in pytest_runtest_call
return (yield)
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/_pytest/skipping.py", line 257, in pytest_runtest_call
return (yield)
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/_pytest/runner.py", line 183, in pytest_runtest_call
raise e
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/_pytest/runner.py", line 173, in pytest_runtest_call
item.runtest()
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/_pytest/python.py", line 1632, in runtest
self.ihook.pytest_pyfunc_call(pyfuncitem=self)
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_hooks.py", line 513, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_callers.py", line 182, in _multicall
return outcome.get_result()
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_result.py", line 100, in get_result
raise exc.with_traceback(exc.__traceback__)
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/_pytest/python.py", line 162, in pytest_pyfunc_call
result = testfunction(**testargs)
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/pytest_asyncio/plugin.py", line 529, in inner
_loop.run_until_complete(task)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/tests/integration/test_charm.py", line 31, in test_build_and_deploy
await asyncio.gather(
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/juju/model.py", line 1817, in deploy
base = utils.get_local_charm_base(charm_series, charm_dir, client.Base)
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/juju/utils.py", line 379, in get_local_charm_base
channel_for_base = get_series_version(series) if series else ''
File "/home/ubuntu/github-runner/_work/penpot-operator/penpot-operator/.tox/integration/lib/python3.10/site-packages/juju/utils.py", line 3[48](https://github.com/canonical/penpot-operator/actions/runs/9585018551/job/26430073174?pr=2#step:22:49), in get_series_version
raise errors.JujuError("Unknown series : %s", series_name)
juju.errors.JujuError: ('Unknown series : %s', 'noble')
Urgency
Casually reporting
Python-libjuju version
3.4.0.0 (but also in latest source online)
Juju version
3.4.3
Reproduce / Test
# Here's the integration test code that's failing
async def test_build_and_deploy(ops_test: OpsTest, pytestconfig: pytest.Config):
"""Deploy the charm together with related charms.
Assert on the unit status before any relations/configurations take place.
"""
charm = pytestconfig.getoption("--charm-file")
# Deploy the charm and wait for active/idle status
assert ops_test.model
await asyncio.gather(
ops_test.model.deploy(f"./{charm}", application_name=APP_NAME, series="noble"),
ops_test.model.wait_for_idle(
apps=[APP_NAME], status="active", raise_on_blocked=True, timeout=1000
),
)
Offhand, we want people to move away from series and towards 'base' as the preferred syntax from 3.x onward. 2.9 won't add support for Noble, so there's at least a question as to whether we should add support for 'noble'
as a string, or whether we use this as the forcing function to move people over to base='24.04'
instead.
(Note that is separate from the Juju bug about having a noble
base for the charm to live in)
Offhand, we want people to move away from series and towards 'base' as the preferred syntax from 3.x onward. 2.9 won't add support for Noble, so there's at least a question as to whether we should add support for
'noble'
as a string, or whether we use this as the forcing function to move people over tobase='24.04'
instead.
In juju/juju we are considering Noble to be the final OS that we will allow Juju to understand as a series. From here, --series
will not recognise later codenames.
I feel it makes sense to replicate this in pylibjuju