list broken modules #690
list broken modules #690MartinsNadia wants to merge 2 commits intoEESSI:2023.06-software.eessi.iofrom
Conversation
|
Instance
|
|
Instance
|
|
@MartinsNadia This has two things inside, the missing modules script and the licencing PR, these need to be separated out. |
modules/module_check.sh
Outdated
| declare -A checked_modules | ||
|
|
||
| # Locate all .eb files within the base dir | ||
| easyconfig_files=$(find $base_dir -name "*.eb") |
There was a problem hiding this comment.
This is quite a hammer depending on how this is used. It will run on the entire stack, which can take a long time as sanity checks are also run when using --module-only (but not if coupled with --force I think)
There was a problem hiding this comment.
It would be better if we can selectively do this for easyconfigs that are introduced by a PR.
One way to do this is to gather that information using --missing based on the easy stack files touched by a PR.
As for implementation, to me this would have to be done as part of the build script:
- Gather the easyconfigs to be installed using
--missingon the easystack file touched by the PR (which is already known in the build script) - Do the builds as currently implemented
- Go through the missing easyconfig list with
--module-onlyand the other necessary options, compare the two modules and make sure that they are identical
There was a problem hiding this comment.
Specifically, I mean targeting the loop
software-layer/EESSI-install-software.sh
Lines 276 to 295 in 3944b3b
There was a problem hiding this comment.
So add a step before 279 to gather the easyconfig files that will be built, then add an else clause to L283 (i.e., when the build succeeds) which rebuilds the module and checks the module contents against the original
There was a problem hiding this comment.
This won't catch the existing software that fail --module-only but it will stop other being added in the future. You're existing script could (almost) be used to catch existing failures (but it is currently not checking the contents for the module to make sure they match).
modules/module_check.sh
Outdated
| echo "Testing module: $module_name" | ||
|
|
||
| # Try loading the module | ||
| if module --ignore_cache load $module_name 2>/dev/null; then |
There was a problem hiding this comment.
This is checking if the module can be loaded, but we probably want more than that, we want to check that the resulting environment (apart from Lmod variables) is the same as when the original module was loaded.
There was a problem hiding this comment.
You can do this easily enough on a module by module basis, just by changing the MODULEPATH:
module purge; module unuse $module_install_dirto reset for the next module- Load the original module, 'module --ignore_cache load $module_name'
- store the environment using
env, filtering out Lmod related content module use $module_install_dir- reload the module (making sure it comes from where you expect)
- Store the new environment (also filtering)
- Make sure they are identical
modules/module_check.sh
Outdated
| for module_category in $(ls $module_install_dir/all); do | ||
| for module_version in $(ls $module_install_dir/all/$module_category); do | ||
| module_name="$module_category/$module_version" |
There was a problem hiding this comment.
| for module_category in $(ls $module_install_dir/all); do | |
| for module_version in $(ls $module_install_dir/all/$module_category); do | |
| module_name="$module_category/$module_version" | |
| for module_software in $(ls $module_install_dir/all); do | |
| for module_version in $(ls $module_install_dir/all/$module_software); do | |
| module_name="$module_software/$module_version" |
| @@ -0,0 +1,57 @@ | |||
| name: Check and update licenses | |||
There was a problem hiding this comment.
This is still mixing up two PRs, the one for licenses and the one for checking --module-only
| @@ -0,0 +1,203 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Does this work? Have you got sample output?
adding PR handling, build and comparison of modules and envs
beec303 to
519a654
Compare
|
@hvelab Is this something you can pick up on again. It should probably also be moved to https://github.com/EESSI/software-layer-scripts. |
Add script to list broken modules using
--module-only