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

Support read-only environment management #122

Open
mcg1969 opened this issue Jul 8, 2023 · 3 comments
Open

Support read-only environment management #122

mcg1969 opened this issue Jul 8, 2023 · 3 comments
Labels
AEDSP To provide compatibility with AEDSP enhancement New feature or request

Comments

@mcg1969
Copy link
Contributor

mcg1969 commented Jul 8, 2023

anaconda-project supports the ability for projects to depend on read-only environments. The behavior when an environment with the given name deviates from the requirements of the project is controlled by the variable ANACONDA_PROJECT_READONLY_ENVS_POLICY:

  • fail: the attempt to install/activate the project fails.
  • replace: a brand new environment is created, and the existing environment is ignored.
  • clone: the existing environment is cloned to a read-write location, and is then updated to meet the requirements of the project.

AEDSP depends on this behavior, hardcoded to clone mode, to allow administrators to provide a library of centrally managed environments for projects to depend upon. This capability depends closely on #121 as well for obvious reasons.

More information here: https://anaconda-project.readthedocs.io/en/latest/config.html

The relevant code is here: https://github.com/Anaconda-Platform/anaconda-project/blob/master/anaconda_project/requirements_registry/providers/conda_env.py#L207-L227

@mcg1969 mcg1969 added AEDSP To provide compatibility with AEDSP enhancement New feature or request labels Jul 8, 2023
@AlbertDeFusco
Copy link
Contributor

Thanks for the issue. Currently is_consistent checks for an exact match between the installed env and the lock spec.

This looks like an opportunity to support something like satisfies. Would you want something a little looser than is_consistent where the read-only env may have additional packages than is required by the lockspec? And must the installed packages be an exact match down to the sha256/md5 hash?

@mcg1969
Copy link
Contributor Author

mcg1969 commented Aug 30, 2023

@AlbertDeFusco I don't really know how to answer your questions, because I don't use conda project, so I'm not sufficiently familiar with its approach. What I want is the functionality we currently have in anaconda-project. If there is more than that in conda-project, that is fine.

@mcg1969
Copy link
Contributor Author

mcg1969 commented Aug 30, 2023

I have a feeling you are trying harder to keep things "locked" than anaconda-project does, and that is going to cause considerable difficulties with the way AE5 works. Locks are for production, IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AEDSP To provide compatibility with AEDSP enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants