DUNE-DAQ / daq-release

Scripts and configuration files for the DUNE DAQ release
https://dune-daq-sw.readthedocs.io/en/latest/packages/daq-release/
2 stars 0 forks source link

amogan/issue139 Parse CMakeLists dependencies automatically #352

Closed andrewmogan closed 5 months ago

andrewmogan commented 5 months ago

This PR modifies make-release-repo.py and the package.py files for both FD and ND packages. The depends_on("package") list in the spack recipes are replaced by XDEPENDSX which, similar to XVERSIONX and XHASHX, will be replaced when generating the package repository. Basically, DAQRelease.generate_daq_package will now parse each package's CMakeLists.txt and infer dependencies from find_package calls. Some exceptions are handled with brute force if/elif statements. The Alma9 nightly build succeeds when using this branch, and I can successfully create a local area based on this branch from cvmfs.

andrewmogan commented 5 months ago

Forgot to reference Issue #139

jcfreeman2 commented 5 months ago

Thanks a lot. This overall looks good, but there are three things to address: 1) While it's currently the case that far-detector-specific packages and near-detector-specific packages get the benefits of the new algorithm, it appears that this is not the case for the common packages (e.g. appfwk, ipm, etc.) 2) When get_cmake_dependencies is called, regardless of the desired branch of the package in question, it's always the CMakeLists.txt file from the develop branch which gets parsed 3) If a failure to curl a CMakeLists.txt file occurs, currently this parses as "print a warning and give the package in question no dependencies". We should instead treat this as a catastrophic error and have the script exit at this point; see this article by software guru Martin Fowler on the principle behind this advice.

jcfreeman2 commented 5 months ago

Now we're getting to fine tuning things. I did a side-by-side comparison of all the package.py files both using the traditional, "hardwired" package.pys and the package.pys generated by this script. The following need to be addressed, and once this is done we should be good to go:

jcfreeman2 commented 5 months ago

With the current head of the feature branch, I successfully created a test nightly for the v4.3.0 release (https://github.com/DUNE-DAQ/daq-release/actions/runs/8270039867) and ran minimal_system_quick_test.py with it both on daq.fnal.gov and np04-srv-015. Approved.