pcdshub / engineering_tools

A repository of scripts, configuration useful for the PCDS team
Other
4 stars 27 forks source link

pcds_conda drops you into the new env even before it's ready #136

Closed ZLLentz closed 2 years ago

ZLLentz commented 2 years ago

Expected Behavior

source pcds_conda without the env variable set should drop you into the latest environment that exists and is fully-formed.

Current Behavior

If I've pressed the "deploy env" button but the environment isn't complete, it still drops you into the new environment.

Possible Solution

Maybe there's an automatic way to know if the env is ready? Or maybe it's better and safer to hard-code the "latest" env name and update it manually once ready.

tangkong commented 2 years ago

Having the latest env name might be a good idea and allow us to deploy the environment well ahead of time while only forcing people onto it once it's done/stable.

A hacky thought: Is it possible to have some empty package queued to be the last installed? the activation script could look for that as a pre-requisite to loading the env?

ZLLentz commented 2 years ago

Having the latest env name might be a good idea and allow us to deploy the environment well ahead of time while only forcing people onto it once it's done/stable.

I agree 100%. We can think on it a bit but this is what I'm leaning towards.

A hacky thought: Is it possible to have some empty package queued to be the last installed? the activation script could look for that as a pre-requisite to loading the env?

I think so, but if we're doing post-install steps anyway we could do something simpler, like having pcds_conda read from a "latest_env" file and having the post-install write this file out.