Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing dependency charmcraft leads ERROR at setup of test_bundle_correctness #156

Open
motjuste opened this issue Feb 6, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@motjuste
Copy link

motjuste commented Feb 6, 2025

x### Bug Description

Solutions QA had multiple recent failures in running the UATs where the test_bundle_correctness could not even be started due to had a Missing Dependency: charmcraft. I noticed that this test was added recently in #155 but don't see charmcraft being listed as a dependency anywhere.

To Reproduce

  1. Deploy CKF 1.9/stable in the environment described below.
  2. Create a venv using the system's Python (3.10.12) and install tox in it
  3. Clone the UATs and run tox -e uats-remote -- --junitxml=/home/ubuntu/project/generated/kubeflow/charmed-kubeflow-uats/junit.xml --filter 'not mlflow'

Environment

  • Juju 3.6.2
  • Charmed Kubernetes 1.31/stable
  • Charmed Kubeflow 1.9/stable
  • On top of AWS

Relevant Log Output

2025-02-06-10:35:40 root DEBUG �[31m�[1m__________________ ERROR at setup of test_bundle_correctness ___________________�[0m
2025-02-06-10:35:40 root DEBUG Traceback (most recent call last):
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/runner.py", line 341, in from_call
2025-02-06-10:35:40 root DEBUG     result: TResult | None = func()
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/runner.py", line 242, in <lambda>
2025-02-06-10:35:40 root DEBUG     lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pluggy/_hooks.py", line 513, in __call__
2025-02-06-10:35:40 root DEBUG     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pluggy/_manager.py", line 120, in _hookexec
2025-02-06-10:35:40 root DEBUG     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pluggy/_callers.py", line 139, in _multicall
2025-02-06-10:35:40 root DEBUG     raise exception.with_traceback(exception.__traceback__)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pluggy/_callers.py", line 122, in _multicall
2025-02-06-10:35:40 root DEBUG     teardown.throw(exception)  # type: ignore[union-attr]
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/unraisableexception.py", line 90, in pytest_runtest_setup
2025-02-06-10:35:40 root DEBUG     yield from unraisable_exception_runtest_hook()
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/unraisableexception.py", line 70, in unraisable_exception_runtest_hook
2025-02-06-10:35:40 root DEBUG     yield
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pluggy/_callers.py", line 122, in _multicall
2025-02-06-10:35:40 root DEBUG     teardown.throw(exception)  # type: ignore[union-attr]
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/logging.py", line 840, in pytest_runtest_setup
2025-02-06-10:35:40 root DEBUG     yield from self._runtest_for(item, "setup")
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/logging.py", line 829, in _runtest_for
2025-02-06-10:35:40 root DEBUG     yield
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pluggy/_callers.py", line 122, in _multicall
2025-02-06-10:35:40 root DEBUG     teardown.throw(exception)  # type: ignore[union-attr]
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/capture.py", line 875, in pytest_runtest_setup
2025-02-06-10:35:40 root DEBUG     return (yield)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pluggy/_callers.py", line 122, in _multicall
2025-02-06-10:35:40 root DEBUG     teardown.throw(exception)  # type: ignore[union-attr]
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/threadexception.py", line 87, in pytest_runtest_setup
2025-02-06-10:35:40 root DEBUG     yield from thread_exception_runtest_hook()
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/threadexception.py", line 68, in thread_exception_runtest_hook
2025-02-06-10:35:40 root DEBUG     yield
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pluggy/_callers.py", line 103, in _multicall
2025-02-06-10:35:40 root DEBUG     res = hook_impl.function(*args)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/runner.py", line 160, in pytest_runtest_setup
2025-02-06-10:35:40 root DEBUG     item.session._setupstate.setup(item)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/runner.py", line 514, in setup
2025-02-06-10:35:40 root DEBUG     col.setup()
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/python.py", line 1630, in setup
2025-02-06-10:35:40 root DEBUG     self._request._fillfixtures()
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/fixtures.py", line 697, in _fillfixtures
2025-02-06-10:35:40 root DEBUG     item.funcargs[argname] = self.getfixturevalue(argname)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/fixtures.py", line 532, in getfixturevalue
2025-02-06-10:35:40 root DEBUG     fixturedef = self._get_active_fixturedef(argname)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/fixtures.py", line 617, in _get_active_fixturedef
2025-02-06-10:35:40 root DEBUG     fixturedef.execute(request=subrequest)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/fixtures.py", line 1091, in execute
2025-02-06-10:35:40 root DEBUG     result = ihook.pytest_fixture_setup(fixturedef=self, request=request)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pluggy/_hooks.py", line 513, in __call__
2025-02-06-10:35:40 root DEBUG     return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pluggy/_manager.py", line 120, in _hookexec
2025-02-06-10:35:40 root DEBUG     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pluggy/_callers.py", line 182, in _multicall
2025-02-06-10:35:40 root DEBUG     return outcome.get_result()
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pluggy/_result.py", line 100, in get_result
2025-02-06-10:35:40 root DEBUG     raise exc.with_traceback(exc.__traceback__)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pluggy/_callers.py", line 167, in _multicall
2025-02-06-10:35:40 root DEBUG     teardown.throw(outcome._exception)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/setuponly.py", line 36, in pytest_fixture_setup
2025-02-06-10:35:40 root DEBUG     return (yield)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pluggy/_callers.py", line 103, in _multicall
2025-02-06-10:35:40 root DEBUG     res = hook_impl.function(*args)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/fixtures.py", line 1140, in pytest_fixture_setup
2025-02-06-10:35:40 root DEBUG     result = call_fixture_func(fixturefunc, request, kwargs)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/_pytest/fixtures.py", line 898, in call_fixture_func
2025-02-06-10:35:40 root DEBUG     fixture_result = fixturefunc(**kwargs)
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pytest_asyncio/plugin.py", line 302, in _asyncgen_fixture_wrapper
2025-02-06-10:35:40 root DEBUG     result = event_loop.run_until_complete(setup())
2025-02-06-10:35:40 root DEBUG   File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
2025-02-06-10:35:40 root DEBUG     return future.result()
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pytest_asyncio/plugin.py", line 284, in setup
2025-02-06-10:35:40 root DEBUG     res = await gen_obj.__anext__()
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pytest_operator/plugin.py", line 247, in ops_test
2025-02-06-10:35:40 root DEBUG     check_deps("juju", "charmcraft")
2025-02-06-10:35:40 root DEBUG   File "/home/ubuntu/charmed-kubeflow-uats/.tox/uats-remote/lib/python3.10/site-packages/pytest_operator/plugin.py", line 181, in check_deps
2025-02-06-10:35:40 root DEBUG     raise RuntimeError(
2025-02-06-10:35:40 root DEBUG RuntimeError: Missing dependency: charmcraft

Additional Context

No response

@motjuste motjuste added the bug Something isn't working label Feb 6, 2025
Copy link

Thank you for reporting your feedback to us!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-6891.

This message was autogenerated

@deusebio
Copy link
Contributor

deusebio commented Feb 10, 2025

Hi @motjuste .

The PR has not added any extra dependency, but I have noticed that now the tests explicitely uses the pytest-operator to be able to interact with the deployment. That requires the charmcraft to be installed, see here.

I believe that went unnoticed before because although the pytest-operator was already part of the dependency, it was not explicitly used.

Could you please add this dependency to your setup? Unfortunately, since it is not a python dependency, this installation cannot be triggered by pip / tox / poetry.

@DnPlas
Copy link
Contributor

DnPlas commented Feb 12, 2025

(team) We think it would be good for the resolution of this issue to add charmcraft as a prerequisite for running the UATs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants