-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Add Slow CI reminder bot #33506
Add Slow CI reminder bot #33506
Conversation
|
||
# For security reason, don't use `pull_request` but `pull_request__target`! | ||
on: | ||
pull_request__target: |
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 security reason, see here
This event runs in the context of the base of the pull request, rather than in the context of the merge commit, as the pull_request event does. This prevents execution of unsafe code from the head of the pull request that could alter your repository or steal any secrets you use in your workflow. This event allows your workflow to do things like label or comment on pull requests from forks. Avoid using this event if you need to build or run code from the pull request.
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.
Also we need to use pull_request__target
so every time a push to a PR will trigger the workflow without an approval by internal team members
Note: Workflows triggered by pull_request__target events are run in the context of the base branch. Since the base branch is considered trusted, workflows triggered by these events will always run, regardless of approval settings. For more information about the pull_request__target event, see "Events that trigger workflows."
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.
Thank you for starting this PR! 🤗
I have a few suggestions to improve the workflow from both ends (contributor and maintainer):
- State in the text that this is a reminder for the maintainer, not for the contributor 🤗
- Add a link to our notion page, so that we can quickly confirm the commands to run the slow CI
- Not sure if possible/easy, but it would be cool to skip this command if there are no relevant slow tests. At the very least, if no
.py
files were changed
Great suggestions, thank you! |
+1 to @gante points 2 & 3 For 1, I think we can put some of this on the contributors to enable (even if they're not responsible for ensuring they've run) to save maintainers some time :) We could add a message along the lines of:
|
Hey! Comments addressed. I change a bit of wording (cc @amyeroberts). WDYT? It looks like below Before merging this pull request, slow tests CI should be triggered. To enable this:
(For maintainers) The documentation for slow tests CI on PRs is here. |
I think @ArthurZucker's approval would count more than mine on this |
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.
Looks nice, would be better IMO if we don't have @ydshieh commenting, but a huggy-bot or something!
I think we can filter a little bit if it's modeling changes to important models only / new models WDYT?
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Any further comment @ArthurZucker ? |
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.
Yeah a lot better thanks!
Can we have @glegendre01 's approval for the security of using outsourced actions?
That action is used in huggingface/doc-builder
|
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
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.
Okay, then just this one peter-evans/find-comment@v2
! 🤗 LGTM otherwise thanks 🤗
oh, i forget that one here now, but it's also used already (I checked it before) (I won't keep silence when I actually a new action - you can trust me!) |
I will wait and merge on Monday instead. Don't want to confuse the contributors during the weekend. Thanks for review! |
* add workflow * update * fix * Update .github/workflows/slow_ci_remainder.yml Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com> * fix * fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com> Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* add workflow * update * fix * Update .github/workflows/slow_ci_remainder.yml Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com> * fix * fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com> Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* add workflow * update * fix * Update .github/workflows/slow_ci_remainder.yml Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com> * fix * fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com> Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
What does this PR do?
@amyeroberts and @gante both mentioned that it would be helpful if we have such a reminder (so we won't forget to trigger whenever necessary)
p.s.
comment_bot_token
whose owner is HuggingFaceDocBuilderDev, which might seems a bit strange. But I think it's fine (and not to create a new member with a new token again)