relax major version match regex in find_related_easyconfigs using for --review-pr#4385
Conversation
smoors
left a comment
There was a problem hiding this comment.
for maximum flexibility it would be nice if we could somehow tell EB: "please don't filter any versions, i will do the filtering with --review-pr-filter".
| version_patterns.append(r'%s\.%s\.\w+' % tuple(parsed_version[:2])) # major/minor version match | ||
| if parsed_version != parsed_version[0]: | ||
| version_patterns.append(r'%s\.[\d-]+\.\w+' % parsed_version[0]) # major version match | ||
| version_patterns.append(r'%s\.[\d-]+(\.\w+)*' % parsed_version[0]) # major version match |
There was a problem hiding this comment.
why not just like this:
| version_patterns.append(r'%s\.[\d-]+(\.\w+)*' % parsed_version[0]) # major version match | |
| version_patterns.append(r'%s\.\w+' % parsed_version[0]) # major version match |
There was a problem hiding this comment.
@smoors this makes test_find_related_easyconfigs fail, at least as it is now, because it also matches easyconfigs with different toolchains and versionsuffixes (note that these version_patterns are only part of the actual regex, the toolchain and versionsuffixes patterns are inserted in the next block)
to be clear, although my suggestion doesn't make the tests fail, I'm also not sure if it won't change the behaviour in some unintended way, which is way I marked the PR as draft :)
I suppose we can do that, it should be just a matter of passing |
@smoors indeed, it's trivial to do, but note that when a PR includes many easyconfigs, we would be replacing eb's filtering per easyconfig with a filter that is the same for all easyconfigs in the PR, it may end up being counterproductive... |
indeed, my idea was to make this optional, as you don't always want this. to avoid having to define yet another cmd line option for this, maybe we can do something like this is just an idea of course, doesn't need to be in this PR |
find_related_easyconfigs
|
@migueldiascosta Any reason why this is marked as draft? |
find_related_easyconfigsfind_related_easyconfigs using for --review-pr
motivated by discussion on slack where
eb --review-pr 19271is showing only a very old related easyconfig, because it's the only one that has a .patch (as in major.minor.patch) version component