-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
relax major version match regex in find_related_easyconfigs
using for --review-pr
#4385
relax major version match regex in find_related_easyconfigs
using for --review-pr
#4385
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
".
@@ -472,7 +472,7 @@ def find_related_easyconfigs(path, ec): | |||
if len(parsed_version) >= 2: | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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_easyconfigs
find_related_easyconfigs
using for --review-pr
motivated by discussion on slack where
eb --review-pr 19271
is showing only a very old related easyconfig, because it's the only one that has a .patch (as in major.minor.patch) version component