Enhance test for finding related easyconfigs and fix it #4957
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The matching of "related" easyconfigs isn't specified clearly enough:
easybuild-framework/easybuild/framework/easyconfig/tools.py
Lines 452 to 460 in f4e855b
This leaves open the question whether the toolchain or the software version takes precedence.
I made a test searching for
toy-1.2.3-GCC-12
in['toy-1.2-GCC-12.eb', 'toy-1-GCC-12.eb', 'toy-4-GCC-12.eb', 'toy-1.2.3-GCC-11.eb', 'toy-1.2-GCC-11.eb', 'toy-1-GCC-11.eb', 'toy-4-GCC-11.eb', 'toy-1.2.3-Clang-12.eb', 'toy-1.2-Clang-12.eb', 'toy-1-Clang-12.eb', 'toy-4-Clang-12.eb']
Should this return
toy-1.2-GCC-12.eb
ortoy-1.2.3-GCC-11.eb
? I.e. is the toolchain more important or the version?This should be clarified in the docstring.
Currently I guess the software version is considered more than the toolchain version. But is this really what we want?
Or should we rather compare 1.2.3 against 1.2 in the same toolchain?
Edit:
The above seems to be incomplete: Currently we were NOT finding '1.2' when searching for '1.2.3' but DID find '1.2.4' . I.e. the current search requires all version components.
I changed the regex to match either another version component or NOT a dot so
1.2
and1.2.x
are both matched for1.2.y
(with x!=y)