-
Notifications
You must be signed in to change notification settings - Fork 3
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 for environment.yml/lockfiles #26
base: master
Are you sure you want to change the base?
Conversation
|
||
""" | ||
env = yaml.safe_load(env_yml) | ||
return CondaEnvironment(*env['name'].split('-'), env['meta']['released'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note env['meta']['released']
is now being used as the tag. That may be a problem if the tag is something like 2022_01_01-1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be the case if we wanted to release two versions of the same environment on the same day? Seems unlikely.
Summary of changes discussed to be completed if we choose to continue using conda-rpms
|
|
This PR includes work previously done by @jamesp to support environment.yml and environment lockfiles instead of the bespoke env.spec and env.manifests that existed in a gitenv.
Key changes (since @jamesp changes):
Previously you just needed a lockfile and a name, but this is missing some needed metadata. Particularly, the "tag" is missing. We still need the tag in order to know where to install it. Previously, this was installing it a <install_prefix>/environments/<env_name> so it could be something like /opt/conda-dist/environments/default-current. But we need to to be installed at /opt/conda-dist/environments/default/2022_01_01-1 which is symlinked from .../default/current.
@jamesp changes had only included one spec (env.spec.template) which did what the old tagged_env.spec did. However, then we no longer had an rpm that was creating the symlink and the modulefiles. I have added these into the env.spec.template. I did this, rather than reinstating the tagged_env.spec/env.spec combo because that was dependent on the environment git repo system. We no longer have that, so the environments we create are independent of each other. Therefore, even if we were to switch an environment to a new label (e.g. next -> current), we still have to re deploy it.
We need a version number for the env.specs to differentiate between the different versions of
CondaDist-env-default-current.rpm
. In the old conda_rpms, when using a gitenv, we would get the version number based of the number of commits in the environments git repo. As we have remove the use of a git repo and now the user supplies a environment .yml file and lock file I propose we now also require the version number in the environment.yml file, within the meta section