You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using ops_test.model.deploy in our integration tests. While testing with juju 3.4.4 (along with python-libjuju ^3.2.2) we are able to run the following code:
However, while testing with juju 3.6-beta2 (along with python-libjuju 3.5.2.0), running the above code pulls in base ubuntu@20.04/stable sometimes and base ubuntu@22.04/stable other times. The charm mysql-test-app is available for both focal and jammy.
Example of the same code but different bases pulled:
Because (likely) juju 3.6 no longer supports certain bases (like ubuntu@20.04/stable), the default base python-libjuju uses in ops_test.model.deploy() fails with an error trace (shown in the reproduce section)
=============================================== FAILURES ================================================
_________________________________________ test_build_and_deploy _________________________________________
Traceback (most recent call last):
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/_pytest/runner.py", line 341, in from_call
result: Optional[TResult] = func()
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/_pytest/runner.py", line 262, in <lambda>
lambda: ihook(item=item, **kwds), when=when, reraise=reraise
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_hooks.py", line 433, in __call__
return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_manager.py", line 112, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_callers.py", line 155, in _multicall
return outcome.get_result()
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_result.py", line 108, in get_result
raise exc.with_traceback(exc.__traceback__)
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_callers.py", line 80, in _multicall
res = hook_impl.function(*args)
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/_pytest/runner.py", line 177, in pytest_runtest_call
raise e
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/_pytest/runner.py", line 169, in pytest_runtest_call
item.runtest()
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/_pytest/python.py", line 1792, in runtest
self.ihook.pytest_pyfunc_call(pyfuncitem=self)
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_hooks.py", line 433, in __call__
return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_manager.py", line 112, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_callers.py", line 155, in _multicall
return outcome.get_result()
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_result.py", line 108, in get_result
raise exc.with_traceback(exc.__traceback__)
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/pluggy/_callers.py", line 80, in _multicall
res = hook_impl.function(*args)
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/_pytest/python.py", line 194, in pytest_pyfunc_call
result = testfunction(**testargs)
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/pytest_asyncio/plugin.py", line 532, 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/shayanp/code/mysql-operator/tests/integration/test_deploy_base.py", line 16, in test_build_and_deploy
await ops_test.model.deploy(
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/juju/model.py", line 1841, in deploy
return await self._deploy(
File "/home/shayanp/code/mysql-operator/.tox/integration/lib/python3.10/site-packages/juju/model.py", line 2163, in _deploy
raise JujuError('\n'.join(errors))
juju.errors.JujuError: base "ubuntu@20.04/stable" is not supported, supported bases are: ubuntu@22.04
------------------------------------------ Captured log setup -----------------------------------------
Using juju 3.6-beta2 directly:
shayanp@brisbane:~/code/mysql-operator$ juju3.6.beta deploy -n 1 mysql-test-app
Deployed "mysql-test-app" from charm-hub charm "mysql-test-app", revision 46 in channel latest/stable on ubuntu@22.04/stable
shayanp@brisbane:~/code/mysql-operator$ juju3.6.beta deploy -n 1 mysql-test-app mysql-test-app2
Deployed "mysql-test-app2" from charm-hub charm "mysql-test-app", revision 46 in channel latest/stable on ubuntu@22.04/stable
shayanp@brisbane:~/code/mysql-operator$ juju3.6.beta deploy -n 1 mysql-test-app mysql-test-app3
Deployed "mysql-test-app3" from charm-hub charm "mysql-test-app", revision 46 in channel latest/stable on ubuntu@22.04/stable
The text was updated successfully, but these errors were encountered:
…issue
The test is randomly failing on libjuju 3.5.2.0 with Juju 3.6-beta2,
it is a known issue reported as juju/python-libjuju#1090
As a (temporary?) workaround lets add a base here.
…#506)
* [DPE-5480] Add base to test_multi_relations.py to workaround libjuju issue
The test is randomly failing on libjuju 3.5.2.0 with Juju 3.6-beta2,
it is a known issue reported as juju/python-libjuju#1090
As a (temporary?) workaround lets add a base here.
Description
We are using
ops_test.model.deploy
in our integration tests. While testing with juju 3.4.4 (along with python-libjuju^3.2.2
) we are able to run the following code:However, while testing with juju 3.6-beta2 (along with python-libjuju
3.5.2.0
), running the above code pulls in baseubuntu@20.04/stable
sometimes and baseubuntu@22.04/stable
other times. The charm mysql-test-app is available for both focal and jammy.Example of the same code but different bases pulled:
Because (likely) juju 3.6 no longer supports certain bases (like
ubuntu@20.04/stable
), the default base python-libjuju uses inops_test.model.deploy()
fails with an error trace (shown in the reproduce section)Urgency
Annoying bug in our test suite
Python-libjuju version
3.5.2.0
Juju version
3.6-beta2-ubuntu-amd64
Reproduce / Test
Using:
We get the following trace:
Using juju 3.6-beta2 directly:
The text was updated successfully, but these errors were encountered: