elementary icon indicating copy to clipboard operation
elementary copied to clipboard

disable_elementary_version_check only works if the config file is in the default directory

Open pquadri opened this issue 9 months ago • 3 comments

Describe the bug After upgrading Elementary we started having an issue (in k8s, with no write access to the disk) of it trying to create a folder in the home directory, even though we specified a different config_dir. The initialization of Config() done to check disable_elementary_version_check does not pass any parameter, and searches for the config file only in the default path.

To Reproduce Put a config file anywhere but in the default directory and check that the disable_elementary_version_check is not picked up correctly.

Expected behavior Every usage of Config() picks up the relevant CLI arguments.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Elementary CLI (edr) version: 0.17.0
  • Elementary dbt package version: 0.17.0
  • dbt version you're using 1.8.3
  • Data warehouse Snowflake
  • Infrastructure details: Docker container on K8s in production

Additional context Add any other context about the problem here.

Would you be willing to contribute a fix for this issue? Let us know if you're willing to contribute so that we'll be able to provide guidance.

pquadri avatar Mar 17 '25 17:03 pquadri

I have a similar issue where our k8s cluster does not have internet access to download elementary dbt packages. I have already downloaded them into my dbt project directory. However, the code looks for those packages under elementary's pip install path's dbt_project folder. --project-dir edr parameter is not considered.

Below log is taken from my local system to show that it downloads elementary packages on runtime.

2025-03-23 10:35:58 — INFO — Running with edr=0.18.0
INFO:elementary.cli.cli:Running with edr=0.18.0
2025-03-23 10:35:58 — INFO — Installing packages for edr internal dbt package...
INFO:elementary.clients.dbt.command_line_dbt_runner:Installing packages for edr internal dbt package...
2025-03-23 10:35:58 — INFO — Running dbt command --log-format json deps --project-dir /workspaces/python/elementary/elementary/monitor/dbt_project

To circumvent this, I have temporarily baked elementary dbt packages under site-packages in my container image using dbt deps, which is not ideal.

Also, raised a PR https://github.com/elementary-data/elementary/pull/1867 to fix this issue in edr. I can help update product documentation to share below new setup command.

edr monitor dbt-init

abhipalsingh avatar Mar 23 '25 10:03 abhipalsingh

Can someone help merge the PR #1867 raised above or let me know if a change is needed? Thanks

abhipalsingh avatar Apr 20 '25 16:04 abhipalsingh

This issue is stale because it has been open for too long with no activity. If you would like the issue to remain open, please remove the stale label or leave a comment.

github-actions[bot] avatar Nov 12 '25 02:11 github-actions[bot]