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

Fix import with optional backends dependencies #458

Closed
wilbrdt opened this issue Oct 11, 2023 · 0 comments · Fixed by #488
Closed

Fix import with optional backends dependencies #458

wilbrdt opened this issue Oct 11, 2023 · 0 comments · Fixed by #488
Milestone

Comments

@wilbrdt
Copy link
Contributor

wilbrdt commented Oct 11, 2023

Some backend dependencies are optional, thus, if a backend dependency is missing, importing corresponding backend settings will fail.
An example:

pip install ralph-malph[backend-es,cli]
ralph --help
>  File "/app/src/ralph/backends/conf.py", line 5, in <module>
>    from ralph.backends.data.clickhouse import 
> ClickHouseDataBackendSettings
>  File "/app/src/ralph/backends/data/clickhouse.py", line 11, in <module>
>    import clickhouse_connect
> ModuleNotFoundError: No module named 'clickhouse_connect'

We could probably load them dynamically (see below), or force users to install all optional extras until Ralph switches to a plugin architecture.

Originally found by @SergioSim in #416 (comment)

@wilbrdt wilbrdt mentioned this issue Oct 11, 2023
13 tasks
@wilbrdt wilbrdt added this to the 4.0 milestone Oct 13, 2023
@wilbrdt wilbrdt linked a pull request Oct 31, 2023 that will close this issue
2 tasks
@wilbrdt wilbrdt moved this from Todo to In Progress in Ralph roadmap Oct 31, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Closed in Ralph roadmap Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

1 participant