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

[bug]: kapitan v0.34.0-rc.0 pip and friends does not install required dependency reclass_rs #1210

Closed
1 of 4 tasks
antonincms opened this issue Aug 29, 2024 · 1 comment · Fixed by #1213
Closed
1 of 4 tasks
Labels

Comments

@antonincms
Copy link
Contributor

antonincms commented Aug 29, 2024

Description of the bug

If I install kapitan v0.34.0-rc.0 with the default set of dependency it crashes, but works perfectly if I install reclass_rs.

Steps to reproduce

# If we use the default installation of kapitan it crashes :
❯ pipx install kapitan@git+https://github.com/kapicorp/kapitan@v0.34.0-rc.0 --python=python3.10
  installed package kapitan 0.34.0rc0, installed using Python 3.10.14
  These apps are now globally available
    - kapitan
done! ✨ 🌟 ✨

❯ kapitan --version
Traceback (most recent call last):
  File "/Users/user/.local/bin/kapitan", line 5, in <module>
    from kapitan.cli import main
  File "/Users/user/.local/pipx/venvs/kapitan/lib/python3.10/site-packages/kapitan/cli.py", line 23, in <module>
    from kapitan.inputs.jsonnet import jsonnet_file
  File "/Users/user/.local/pipx/venvs/kapitan/lib/python3.10/site-packages/kapitan/inputs/jsonnet.py", line 16, in <module>
    from kapitan.resources import resource_callbacks, search_imports
  File "/Users/user/.local/pipx/venvs/kapitan/lib/python3.10/site-packages/kapitan/resources.py", line 26, in <module>
    from kapitan.inventory import Inventory, ReclassInventory, AVAILABLE_BACKENDS
  File "/Users/user/.local/pipx/venvs/kapitan/lib/python3.10/site-packages/kapitan/inventory/__init__.py", line 4, in <module>
    from .inv_reclass_rs import ReclassRsInventory
  File "/Users/user/.local/pipx/venvs/kapitan/lib/python3.10/site-packages/kapitan/inventory/inv_reclass_rs.py", line 3, in <module>
    import reclass_rs
ModuleNotFoundError: No module named 'reclass_rs'

# But if we install reclass_rs in the venv of kapitan it works :
❯ pipx inject kapitan reclass_rs
  injected package reclass-rs into venv kapitan
done! ✨ 🌟 ✨

❯ kapitan --version
0.34.0-rc.0

Version (kapitan)

v0.34.0-rc.0

Version (python)

3.10

Python virtual environment

  • pyenv
  • venv
  • pipx
  • no environment

OS information

macOS

@antonincms antonincms added the bug label Aug 29, 2024
@antonincms antonincms changed the title [bug]: kapitan v0.34.0-rc.0 does not start if optional dependency reclass_rs is not installed [bug]: kapitan v0.34.0-rc.0 pip and friends does not install required dependency reclass_rs Aug 30, 2024
@antonincms
Copy link
Contributor Author

antonincms commented Aug 30, 2024

It seems the issue is that reclass_rs is required but still considered optional by pip / pipx / uv.
I tracked it down to the mention of the dependency in extras, I think this PR should fix it.
Another possibility could be to make this dependency optional and handle the case where it is not installed.

ademariag added a commit that referenced this issue Aug 31, 2024
Fix #1210 and improves loading of inventory backends
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant