DUNE-DAQ / daq-buildtools

Make life for developers easier through a collection of CMake functions and scripts
0 stars 1 forks source link

dbt-create.py for spack does not work with the `last_successful` link to the nightly release #186

Closed dingp closed 2 years ago

dingp commented 2 years ago

I created last_successul symlink under spack-nightly just as what we did for UPS releases. However, I found that dbt-create.py does not work well with it.

ERROR: [Mon Apr 18 08:03:46 CEST 2022] [<string>:77]: Release path '/cvmfs/dunedaq.opensciencegrid.org/spack-releases/last_successful' does not exist. Note that you need to pass "-n" for a nightly build. Exiting...
[pding@np04-srv-014 dingpf]$ dbt-create.py -c -n last_successful dev-last
Setting up the Python subsystem.
stdout from /cvmfs/dunedaq.opensciencegrid.org/tools/dbt/v5.0.0/scripts/dbt-clone-pyvenv.sh /cvmfs/dunedaq-development.opensciencegrid.org/spack-nightly/N22-04-17/dbt-pyvenv:

stderr from /cvmfs/dunedaq.opensciencegrid.org/tools/dbt/v5.0.0/scripts/dbt-clone-pyvenv.sh /cvmfs/dunedaq-development.opensciencegrid.org/spack-nightly/N22-04-17/dbt-pyvenv:
==> Error: No such environment: 'last_successful'
ERROR: [04/18/22 08:04:49] [dbt-setup-tools.sh:182]:  There was a problem running "spack env activate last_successful"

ERROR: [Mon Apr 18 08:04:49 CEST 2022] [<string>:156]: There was a problem running "/cvmfs/dunedaq.opensciencegrid.org/tools/dbt/v5.0.0/scripts/dbt-clone-pyvenv.sh /cvmfs/dunedaq-development.opensciencegrid.org/spack-nightly/N22-04-17/dbt-pyvenv" (return value 100); exiting...

The fix would be something like dbt-create.py checks if the release name is a symlink under spack-nightly, and use the linked release name if so.

Something like the following (but converted into python). These are used by package level nightly CI jobs.

release_path=$(readlink -f /cvmfs/dunedaq-development.opensciencegrid.org/spack-nightly/last_successful)
release_name=`basename $release_path`
dingp commented 2 years ago
[pding@np04-srv-014 dingpf]$ dbt-create.py -c -n last_successful dev-last2
Release "last_successful" requested; interpreting this as release "N22-04-18"
Setting up the Python subsystem.

Total time to run /scratch/dingpf/daq-buildtools/bin/dbt-create.py: 432 seconds
Start time: Mon Apr 18 20:25:09 CEST 2022
End time:   Mon Apr 18 20:32:21 CEST 2022

See https://dune-daq-sw.readthedocs.io/en/latest/packages/daq-buildtools for build instructions

Script completed successfully

The bug fix (bdfc51169f3c9e249eddc0b185e8d8545031f12a ) worked. I was also able to verify that the latest nightly from CI is working.