key4hep / key4hep-spack

A Spack recipe repository of Key4hep software.
10 stars 23 forks source link

Unify CVMFS setup scripts #570

Open tmadlener opened 7 months ago

tmadlener commented 7 months ago

BEGINRELEASENOTES

ENDRELEASENOTES

The main goal of this PR is to replace the currently duplicated setup scripts that are deployed on CVMFS by one setup script that sources either nightlies or releases depending on where the script is deployed in the end. This should also work if the script is deployed in other places as long as the installation configuration for spack is the same as we usually use.

This doesn't necessarily simplify the setup script, but at least we only have to fix things in one place in case they are broken.

jmcarcell commented 7 months ago

The unification changes a few things, from a quick look this doesn't work with zsh and I'm not sure it will be fine when wrapped in scripts (for example in grid jobs) because of the shifts. The issue is there are a bunch of changes that have been done, there aren't any tests (I started writing some but never got to have them run somewhere in CI) and they are not documented but someone will complain if they are changed. In general I would like to make as few changes in the scripts as possible, the pain is having to copy and paste something twice which is not that bad and the scripts may diverge more in the future (for example listing the packages should be done differently for the nightlies -- currently it only shows the ones that changed -- because they are built differently than the releases) and more changes like that are possible in the future. For the builds it's somehow useful they are split as you can not depend on sw.hsf.org for building the nightlies, but this eventually will change.

Summary: I would like to keep them as they are and only fix what's broken and add features if there is a demand and they are useful

tmadlener commented 7 months ago

Yeah, I see the point. I am not the biggest fan of the duplication, especially for the utility functionality like detecting the os, etc... Should we try to at least to unify that a bit?