idaholab / raven

RAVEN is a flexible and multi-purpose probabilistic risk analysis, validation and uncertainty quantification, parameter optimization, model reduction and data knowledge-discovering framework.
https://raven.inl.gov/
Apache License 2.0
217 stars 133 forks source link

[DEFECT] Allow trying again when removing environment fails #2217

Closed joshua-cogliati-inl closed 8 months ago

joshua-cogliati-inl commented 9 months ago

Thank you for the defect report

Defect Description

Sometimes, when a filesystem is slow, conda will fail.

Example (from https://civet.inl.gov/job/1899935/ ):

BUILD_ROOT/raven/: scripts/establish_conda_env.sh --install --conda-defs /apps/local/mambaforge/etc/profile.d/conda.sh --no-mamba
/apps/local/mambaforge/bin/mamba
... not using mamba
CONDA
... Run Options:
... ECE Mode: 2
... Verbosity: 0
... Clean: 0
... Install Mode: CONDA
... Conda Defs: /apps/local/mambaforge/etc/profile.d/conda.sh
... Installing RAVEN libraries ...
... Detected OS as --os linux ...
... Using Python command python
... RAVEN library name set through $RAVEN_LIBS_NAME global variable.
... >> If this is not desired, then unset the variable before running.
... >> RAVEN environment is named "raven_libraries"
... Found conda definitions at /apps/local/mambaforge/etc/profile.d/conda.sh
conda 23.3.1
raven_libraries_lemhi     /home/civet/.conda/envs/raven_libraries_lemhi
raven_libraries_sawtooth     /home/civet/.conda/envs/raven_libraries_sawtooth
raven_libraries_tf       /home/civet/.conda/envs/raven_libraries_tf
                         /home/civet/miniconda3/envs/raven_libraries
                         /home/civet/miniconda3/envs/raven_libraries_dask
... Found library environment ...
... Removing old environment ...

DirectoryNotACondaEnvironmentError: The target directory exists, but it is not a conda environment.
Use 'conda create' to convert the directory to a conda environment.
  target directory: /home/civet/.conda/envs/raven_libraries

Steps to Reproduce

Run install again on sawtooth.

Expected Behavior

The install would just try again.

(As in, if this is repeated, it usually works.)

Screenshots and Input Files

No response

OS

Linux

OS Version

No response

Dependency Manager

CONDA

For Change Control Board: Issue Review

For Change Control Board: Issue Closure