Skip to content

add --review-pr-max and --review-pr-filter options to limit easyconfigs used by --review-pr + retain order of easyconfigs being compared with#3754

Merged
boegel merged 8 commits intoeasybuilders:developfrom
migueldiascosta:review_pr_diffs
Oct 28, 2021
Merged

add --review-pr-max and --review-pr-filter options to limit easyconfigs used by --review-pr + retain order of easyconfigs being compared with#3754
boegel merged 8 commits intoeasybuilders:developfrom
migueldiascosta:review_pr_diffs

Conversation

@migueldiascosta
Copy link
Copy Markdown
Member

@migueldiascosta migueldiascosta changed the title add --review-pr-max and --review-pr-filter options to limit easyconfigs shown in multi-diff add --review-pr-max and --review-pr-filter options to limit easyconfigs shown in multi-diff (WIP) Jun 22, 2021
@migueldiascosta migueldiascosta linked an issue Jun 22, 2021 that may be closed by this pull request
@migueldiascosta migueldiascosta added this to the next release (4.4.1) milestone Jun 22, 2021
@easybuilders easybuilders deleted a comment from boegelbot Jun 23, 2021
@boegel boegel modified the milestones: 4.4.2, release after 4.4.2 Sep 1, 2021
@boegel boegel modified the milestones: 4.5.0, 4.x Oct 13, 2021
Comment thread easybuild/framework/easyconfig/tools.py Outdated
@migueldiascosta
Copy link
Copy Markdown
Member Author

naturally, removing the sort affects the tests, I'll take care of it

@boegelbot

This comment has been minimized.

@migueldiascosta
Copy link
Copy Markdown
Member Author

without the sort, the tests run differently in the CI and locally, I suppose because the order of glob is not well defined. So it would seem we do need to sort somewhere, but making sure higher versions come first when using --review-pr-max (?)

@Micket
Copy link
Copy Markdown
Contributor

Micket commented Oct 21, 2021

I suggest just making the globbed values stable:

potential_paths = sorted(sum(potential_paths, []), reverse=True) # flatten

by sorting them what most likely is the best -> word order (unless corner cases where a software goes from 2.9 to 2.10, but, the version matching logic mostly takes care of that.

I think this leaves find_related_easyconfigs in a pretty good state, and it can be improved in the future if an even better matching procedure can be constructed independently of this code for limiting the output.
I really don't think we need, or should, do anything special whether these new flags are in use.

(I was planning on also using this method for the boegelbot check, but with some modifications;

  1. Just the first match
  2. Just show a normal 2 file diff without the other stuff
  3. Not the other text output
  4. Probably add a link to the best matching existing easyconfig on github)

@migueldiascosta
Copy link
Copy Markdown
Member Author

@boegel I tested test.framework.suite github locally with python 2 and 3, but it would probably be best if you do too :)

Copy link
Copy Markdown
Contributor

@Micket Micket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Micket Micket modified the milestones: 4.x, 4.5.0 (next release) Oct 28, 2021
@Micket
Copy link
Copy Markdown
Contributor

Micket commented Oct 28, 2021

The many tests configurations done by the CI should suffice here no? I think it's good to be merged for 4.5.0

@migueldiascosta
Copy link
Copy Markdown
Member Author

migueldiascosta commented Oct 28, 2021

@Micket for PRs, the CI skips the tests that require a github token such as test_github_review_pr. I did run all the github tests locally from this branch, and you can too if you install a token for the easybuild_test user

I'd still want to hear from @boegel though. This seems both useful and harmless to me, but maybe we're missing something.

@boegel boegel changed the title add --review-pr-max and --review-pr-filter options to limit easyconfigs shown in multi-diff (WIP) add --review-pr-max and --review-pr-filter options to limit easyconfigs shown in multi-diff Oct 28, 2021
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me.

The GitHub tests (both in test.framework.github and test.framework.options) are passing locally for me too, with both Python 2 and Python 3.

@boegel boegel changed the title add --review-pr-max and --review-pr-filter options to limit easyconfigs shown in multi-diff add --review-pr-max and --review-pr-filter options to limit easyconfigs shown in multi-diff + retain order of easyconfigs being compared with Oct 28, 2021
@boegel boegel merged commit 5948e8b into easybuilders:develop Oct 28, 2021
@boegel boegel changed the title add --review-pr-max and --review-pr-filter options to limit easyconfigs shown in multi-diff + retain order of easyconfigs being compared with add --review-pr-max and --review-pr-filter options to limit easyconfigs used by --review-pr + retain order of easyconfigs being compared with Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

the output of --review-pr could be clearer...

4 participants