-
Notifications
You must be signed in to change notification settings - Fork 48
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
Allow for open PRs when checking missing installations in build script #493
Allow for open PRs when checking missing installations in build script #493
Conversation
Instance
|
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.
I've tried this interactively using an EasyStack file containing:
easyconfigs:
- GCC-13.2.0.eb
- foss-2023b.eb
- SciPy-bundle-2023.11-gfbf-2023b.eb
- netCDF-4.9.2-gompi-2023b.eb:
options:
from-pr: 19534
- matplotlib-3.8.2-gfbf-2023b.eb:
options:
from-pr: 19552
- CDO-2.2.2-gompi-2023b.eb:
options:
from-pr: 19792
- CFITSIO-4.3.1-GCCcore-13.2.0.eb:
options:
from-pr: 19840
I downloaded wget https://github.com/EESSI/software-layer/pull/479.diff
to get a diff that would create an exception for CFITSIO
.
Then, I ran
./check_missing_installations.sh easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.0-2023b.yml 479.diff
interactively. That resulted in a succesful run, i.e. it did not print anything with the message (are you sure all PRs referenced have been merged in EasyBuild?)
.
I'm not sure if this was your intention? I can't imagine it is, the only moment in which this error would be printed is if one of the software listed in the EasyStack file from previous PR had a --from-pr
that wasn't merged yet. That should not have happened if we did our reviews well... :)
Also, you mentioned that this will fail in Github Actions, but I don't see any change to the github CI. It also made me think: that might be too late, as we do the deploy
even when github CI is failing (we are used to it, since one of the CI checks is 'was this PR deployed' for every architecture).
As mentioned in #479 (comment) I don't disagree with the fact that it results in a failure (so maybe we should) not make an exception, but I would like to give a more clear message (reported back to the PR by the bot) as to why it failed.
I'm currently working on something that'll add a "Reason" to the failure, similar to what I did for the test step in https://github.com/EESSI/software-layer/pull/467/files . I think the work you did here is going to allign well with that (I'd feel bad for telling you it wouldn't after you spend a day on this ;-)). But, it would require some slight modification:
- create a 2nd EasyStack file in which the exception for the
--from-pr
is made - do your original thing first, i.e. run only against develop.
- If the exist status is 1 and if the output file contains a pattern like
ERROR: One or more files not found: AOFlagger-3.4.0-foss-2023b.eb (search paths: /tmp/tmp.d83nFSn6v6/easyconfigs/easybuild/easyconfigs)
, then we want to run again with your exception. - If that 2nd succeeds, we know the problem was an umerged PR, and we print the failure message you envisioned
...(are you sure all PRs referenced have been merged in EasyBuild?)
In my own PR (that modifies check-build
, I can pick up on that pattern (which is very specific), and have the bot print it as "Reason" in it's response in the PR. My own PR isn't there yet, but you can take a sneak peek in https://github.com/casparvl/software-layer/tree/improve_error_on_unmerged_pr
N.B. After finishing my part, I'll pull in your changes to my PR, make the changes I suggest above, and test with the |
This does work as intended, when the script is called by the bot it will allow the open PR and pass. There is another GitHub Action that we call that will only check against develop...so this will stop us from merging something thay has not been integrated upstream |
Ok, but then when does that error message ever get printed? Only in the case where past PRs have added software with
You mean that already exists? Or do you have another PR for that? The biggest issue there is that it would still allow us, reviewers, to add the Anyway, this was my idea #494 . It integrates your awk-logic from this PR, to figure out if an unmerged PR is indeed the reason for the failure. I still need to debug it, it's not actually printing the |
To answer my own first question: I see you add that to the message if the |
Ok, #494 (comment) does what I want now - see the new "Reason" header in there. Honestly, I think we should try to more extensively |
This has been rolled into #494 so closing this |
As mentioned in #479 , with the changes we've made to checking for missing installations the errors from the bot are cryptic when a referenced PR is not merged in EasyBuild. This PR allows for open PRs during the build, but still fails them in GitHub Actions (with a bit more helpful text).