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

Store the state and database files in ~/.conda-store by default #639

Merged
merged 17 commits into from
Oct 26, 2023

Conversation

nkaretnikov
Copy link
Contributor

This work is part of #513. Original PR: #554.

@netlify
Copy link

netlify bot commented Oct 21, 2023

Deploy Preview for kaleidoscopic-dango-0cf31d canceled.

Name Link
🔨 Latest commit d412a2b
🔍 Latest deploy log https://app.netlify.com/sites/kaleidoscopic-dango-0cf31d/deploys/653984ab861696000843d697

@nkaretnikov
Copy link
Contributor Author

nkaretnikov commented Oct 22, 2023

This should land only once Windows lands (#640), to make sure this is compatible.

@nkaretnikov nkaretnikov force-pushed the standalone-state-home-dir branch from 9fd61ac to 41cdc09 Compare October 23, 2023 12:37
@nkaretnikov
Copy link
Contributor Author

Rebased on the Windows PR to be able to test on Windows, will remove redundant commits later.

@nkaretnikov nkaretnikov force-pushed the standalone-state-home-dir branch from 3418203 to 0f722c0 Compare October 25, 2023 14:07
@nkaretnikov nkaretnikov force-pushed the standalone-state-home-dir branch from 5dae296 to 89a5c94 Compare October 25, 2023 16:49
@nkaretnikov
Copy link
Contributor Author

Contents of CONDA_STORE_DIR:

% ls ~/.conda-store
celerybeat-schedule.bak  celerybeat-schedule.dat  celerybeat-schedule.dir  conda-store.sqlite  state  storage

% ls ~/.conda-store/state
default

% ls ~/.conda-store/state/default
a54148c1d1d435985989ea232bc982f0eb877991f6c70c4de1390dd76e7ef564-20231025-184722-649393-2-test-env  envs

ls ~/.conda-store/storage
archive  docker  lockfile  logs  yaml

@nkaretnikov
Copy link
Contributor Author

Tested on Windows and Linux with this env. No files are created in current dir anymore, as expected.

channels:
- conda-forge
dependencies:
- python
- pip:
  - nothing
- ipykernel
- pytest
- requests
description: ''
name: test-env
prefix: null
variables: null

@nkaretnikov
Copy link
Contributor Author

This change shouldn't affect Nebari since it uses a config file, which sets database_url, storage_class, and store_directory.

@nkaretnikov nkaretnikov marked this pull request as ready for review October 25, 2023 22:05
@nkaretnikov nkaretnikov requested a review from costrouc October 25, 2023 22:05
Copy link
Member

@costrouc costrouc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I don't think there is anything controvertial in this PR and I was able to run it locally and have it use ~/.conda-store/...

@costrouc costrouc merged commit 1f66551 into conda-incubator:main Oct 26, 2023
17 checks passed
@jaimergp
Copy link
Member

I wonder if we are on time to instead use well accepted standards like XDG on Linux, or %LOCALAPPDATA% on Windows.

@nkaretnikov
Copy link
Contributor Author

@jaimergp I'm not quite sure that is better. Also, on Windows, I see this:
Screen Shot 2023-11-01 at 08 50 58

Conda and vscode (which is developed by MS) use /Users/<User>.

@jaimergp
Copy link
Member

jaimergp commented Nov 1, 2023

.conda needs to change too but that ship sailed too long ago and people's environments may live there, so it's tricky to change now. .vscode's issue is inherited from Electron (see lengthy thread). We don't have a good excuse I'm afraid :D

@nkaretnikov
Copy link
Contributor Author

Yeah, I've changed my mind after reading relevant threads from other projects. We should use well-accepted standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 💪🏾
Development

Successfully merging this pull request may close these issues.

4 participants