-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
CI Add commit status and comment bot to CUDA CI #29245
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
Conversation
This adds a script that will comment on PRs it tests and set a "commit status" for the commit it tested. This will make the CI workflow show up in the "checks" section at the bottom of a PR.
@EdAbati what do you think of linking to https://gist.github.com/EdAbati/ff3bdc06bafeb92452b3740686cc8d7c from the comment that the bot makes? That would let contributors test/debug build issues without having to wait for a maintainer to trigger the workflow. If we do that, could you add a short instruction text to the gist's description? |
Hi @betatim, Since this gist is becoming part of the process, we could also transfer it to the scikit-learn org (can we do that on GitHub? 🤔) if you prefer. So you all have more control and I don't become the bottleneck for updates :) UPDATE: The gist is updated, let me know what you think |
I was wondering about moving the gist to the scikit-learn org, but not sure if that is possible? Maybe not https://github.com/orgs/community/discussions/7923? I think it is fine to host it on your account. We can link to a particular revision of it so that you aren't on the hook for someone stealing your account on adding evil things to the gist which people then blindly run. |
I think this would be more natural (and safer) to implement if we make this workflow run in a Maybe it's possible to leverage the required reviewers feature of custom environments as documented here: Alternatively we could use a label based trigger of for the workflow as we do for the |
We could host the notebook under a |
I kind of agrees about the It would kind of feel more natural to have the trigger be pull_request like most other CI builds, have a step that waits for manual approval, and then the approval triggers the GPU workflow. Not quite sure how to do this, but it feels like a common usage and surely someone in the world have found a way to do it ... Searching a bit I haven't found anything clear-cut, here is what I found so far ...
|
About the label-based stuff I am wondering whether it has inherently the same security issues as our previous approach. Between the time you set the label and the time the worflow start there is an opportunity for someone to push a commit. Even if you do time-based checks I think there is still some small time window that is exploitable. This is super hard to exploit I know, you'd have to read the mind of the person who is about to set the label, so maybe it is still acceptable I don't know 🤔 ... |
Yes but it could happen in a pull_request github actions environment which comes with cache isolation from the |
I will tackle running the CUDA CI workflow in a PR context in a new PR. And either integrate this work in that or come back to this PR. |
Closing |
This adds a script that will comment on PRs it tests and set a "commit status" for the commit it tested. This will make the CI workflow show up in the "checks" section at the bottom of a PR.
Not sure how we can test this on this repository, so I used it in a private repo: betatim/scikit-learn-ci#4 This PR was tested by a version of this workflow. You can see the comment in action as well as the "check".
Existing PRs that were forked before this PR was merged need rebasing/
main
merging in order for this to work. It is a bit annoying, but it seems even more annoying to add special handling for these "legacy" PRs.Towards #29221