Skip to content

Conversation

Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Jul 9, 2025

The matching of "related" easyconfigs isn't specified clearly enough:

The following criteria are considered (in this order) next to common software version criterion, i.e.
exact version match, a major/minor version match, a major version match, or no version match (in that order).
(i) matching versionsuffix and toolchain name/version
(ii) matching versionsuffix and toolchain name (any toolchain version)
(iii) matching versionsuffix (any toolchain name/version)
(iv) matching toolchain name/version (any versionsuffix)
(v) matching toolchain name (any versionsuffix, toolchain version)
(vi) no extra requirements (any versionsuffix, toolchain name/version)

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 or toy-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 and 1.2.x are both matched for 1.2.y (with x!=y)

@Flamefire Flamefire force-pushed the find-related-ec-test branch from 738fbfb to a71d810 Compare July 23, 2025 11:14
@Flamefire Flamefire changed the title Enhance test for finding related ECs Enhance test for finding related ECs and fix it Jul 23, 2025
@Flamefire Flamefire force-pushed the find-related-ec-test branch from b8786ed to 923b3fa Compare July 23, 2025 14:20
@boegel boegel added the bug fix label Jul 30, 2025
@boegel boegel added this to the release after 5.1.1 milestone Jul 30, 2025
@boegel boegel changed the title Enhance test for finding related ECs and fix it Enhance test for finding related easyconfigs and fix it Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants