Skip to content
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

meta: request reviews from github actions #53149

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

RedYetiDev
Copy link
Member

@RedYetiDev RedYetiDev commented May 25, 2024

Part of #51236

This PR moves the process of commenting on a PR to the main repo's Github Actions, instead of it being handled by the github bot.

This is open to discussion, and I'm not a member of the @nodejs/github-bot team, so I'd love them to take a look and see if this looks good :-)

If landed, the new 'initial comment' that will be posted on PRs is:

Hi 👋! Thank you for submitting this pull-request!

According to the CODEOWNERS file, the following people are responsible for reviewing changes to the files you've modified:

  • @nodejs/team
  • @nodejs/other-team

They, along with other project maintainers, will be notified of your pull request. Please be patient and wait for them to review your changes.

If you have any questions, please don't hesitate to ask!

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/actions
@nodejs-github-bot nodejs-github-bot added meta Issues and PRs related to the general management of the project. tools Issues and PRs related to the tools directory. labels May 25, 2024
@RedYetiDev RedYetiDev added the discuss Issues opened for discussions and feedbacks. label May 25, 2024
@RedYetiDev RedYetiDev force-pushed the review-action branch 2 times, most recently from ab7be7e to 4460e0c Compare June 1, 2024 18:00
@RedYetiDev RedYetiDev added review wanted PRs that need reviews. and removed discuss Issues opened for discussions and feedbacks. labels Jun 14, 2024
@RedYetiDev
Copy link
Member Author

The latest commit addresses nodejs/security-wg#1329.

.github/workflows/label-pr.yml Outdated Show resolved Hide resolved
.github/workflows/request-reviews.yml Show resolved Hide resolved
.github/workflows/request-reviews.yml Show resolved Hide resolved
@RedYetiDev
Copy link
Member Author

@RafaelGSS This PR isn't solely for the TSC to be pinged when a dependency is changed. This moves the process of requesting reviews into the core repo, as mentioned in the past. When the security group mentioned also reviewing from the TSC, I figured I'd add it here as well.

@RafaelGSS
Copy link
Member

This moves the process of requesting reviews into the core repo, as mentioned in the past.

But, what's the motivation behind it? AFAIK This works pretty well at the moment. Don't you think it would cause just more maintenance burden?

@RedYetiDev
Copy link
Member Author

But, what's the motivation behind it? AFAIK This works pretty well at the moment. Don't you think it would cause just more maintenance burden?

I believe it's less cumbersome for collaborators if the code is stored in the main repository and uses a supported Node.js version. As @targos pointed out:

Maintenance of the GitHub bot has become a problem. The machine it's running on is on a quite old version of Debian that doesn't support recent versions of Node.js and we have very few people who know and work on the bot's code (nodejs/github-bot).

@RedYetiDev
Copy link
Member Author

RedYetiDev commented Jun 15, 2024

Requesting review from @targos, as it was his initial issue that brought the idea of migrating to GH actions.

@RafaelGSS
Copy link
Member

I still believe this is unnecessary and an overkill in terms of nodejs/security-wg#1329

@RedYetiDev
Copy link
Member Author

I still believe this is unnecessary and an overkill in terms of nodejs/security-wg#1329

I opened this before that discussion, and I figured that while I added this, I could also incorporate what was discussion

@Uzlopak
Copy link
Contributor

Uzlopak commented Jun 17, 2024

I also think it is overkill.

@RedYetiDev
Copy link
Member Author

@RafaelGSS @Uzlopak

This change is not a response to the security discussion. This is migration of requesting reviews away from the GitHub bot and into GitHub actions.

When I saw the security discussion, I figured I could incorporate it here, but you were correct that it needs its own workflow.

@MoLow
Copy link
Member

MoLow commented Jun 17, 2024

+1 on the sentiment of @RafaelGSS - with regards to processes and automation of the project - let's not fix things that are not broken?

@RedYetiDev
Copy link
Member Author

RedYetiDev commented Jun 17, 2024

let's not fix things that are not broken?

IMO the current setup is (in a way) broken. It's using outdated software and it's hard to maintain, this change would fix part of that, as mentioned in the linked issue.

Maintenance of the GitHub bot has become a problem. The machine it's running on is on a quite old version of Debian that doesn't support recent versions of Node.js and we have very few people who know and work on the bot's code (https://github.com/nodejs/github-bot).

@targos
Copy link
Member

targos commented Jun 18, 2024

The bot is unmaintained and cannot be easily upgraded. IMO this qualifies as broken

@RedYetiDev
Copy link
Member Author

RedYetiDev commented Jun 19, 2024

IMO this qualifies as broken

with that in mind, how do we feel about this PR as a solution for part of the GitHub bot's brokenness?

@RafaelGSS are you still blocking?

@RedYetiDev RedYetiDev requested a review from Uzlopak June 27, 2024 22:59
@RedYetiDev
Copy link
Member Author

↻ (reping) @RafaelGSS (blocking)

@RafaelGSS RafaelGSS dismissed their stale review June 30, 2024 23:25

I'm still -1. But, I won't block.

@RedYetiDev
Copy link
Member Author

Is there a specific reason why your -1?

@RafaelGSS
Copy link
Member

Is there a specific reason why your -1?

Pretty much #53149 (comment). I see your point of view, but I believe all of this can be easily managed through a single github action instead of js file. Also, I'm sharing my point of view related to the security-wg request (request TSC review when deps is changed).

@RedYetiDev
Copy link
Member Author

fwiw I've removed the security part of this, and it's back to what it was originally: a migration to GH actions, which isn't something that IMO can be achieved via a workflow without JS.

@Trott
Copy link
Member

Trott commented Jul 3, 2024

The bot is unmaintained and cannot be easily upgraded. IMO this qualifies as broken

I don't think the bot is unmaintained, exactly, but the server it has been running on has been out of date for a long, long, long time...

...until today! We'll let it bake for a few days, or maybe even weeks, but @richardlau updated it and it now runs on Node.js 20.x and I think we're in a better place.

@RedYetiDev
Copy link
Member Author

RedYetiDev commented Jul 3, 2024

...until today! We'll let it bake for a few days, or maybe even weeks, but @richardlau updated it and it now runs on Node.js 20.x and I think we're in a better place.

(Side note: Yay!)

Even so, in my opinion, using Github Actions to achieve the same result is a more efficient method for several reasons:

  1. Increased Security: GitHub Actions operates on ephemeral runners with dynamic tokens, ensuring continued functionality even if the @nodejs-github-bot is compromised.
  2. Greater Robustness: GitHub Actions eliminates the reliance on webhook calls, streamlining the bot's operation by removing an extra step.
  3. Reduced Maintenance: GitHub Actions can be automatically updated with @dependabot, eliminating the need for manual updates.
  4. Reduced Clutter: It may be helpful to store all the files in one place, such as this repo.

WDYT?

@RedYetiDev
Copy link
Member Author

@Trott you mentioned that the bot has been / will be updated, so I’d love your feedback on how you feel about this change. Thank you!

@Trott
Copy link
Member

Trott commented Jul 14, 2024

@Trott you mentioned that the bot has been / will be updated, so I’d love your feedback on how you feel about this change. Thank you!

I don't have an opinion on whether this should be a bot thing or a GitHub Actions thing. I have lots of opinions on the process itself, but they might be unpopular ones that other maintainers don't share. I'd be interested in their reactions.

  1. I dislike the longer initial comment that will be used if this PR lands ("Hi 👋! Thank you for submitting this pull-request!" and all that). I know there's a general tendency to believe that it's better to provide lots of information and welcoming text, but honestly, this comment is for maintainers and should be optimized for them. Having a comment like this on every pull request is going to cause people to ignore it. Nobody needs most of that information. Just ping the teams and we're good. Less is more here.

  2. Building on the previous item: If it were up to me, I would remove the comment entirely and instead add the team to the Request Review list.

  3. Going even further: This whole process was added because people on certain teams complained that code affecting their subsystem was landing without their review. The only reason we have this process in place is to ping them so they things won't slip by them and to also let reviewers know that maybe they should make sure someone from the relevant team reviews it. If it were up to me, I'd remove most of the teams from CODEOWNERS and leave just the ones that want to be pinged, which isn't very many of them. Probably streams, probably TSC on a few files, probably crypto, and maybe one or two others.

  4. Going all the way to the logical conclusion: The big problem for Node.js maintainers is notification overload. This process was supposed to help solve it by enabling contributors to turn off notifications for the repo but still get pinged for specific things they care about. In practice, I don't think very many (any?) people have done that and this process has backfired and created more notifications for people. I don't even think it's working for the folks for whom it was designed (streams, I think?). Maybe it should just be removed. (However, if I'm wrong, and it in fact works super well for even just one or two maintainers, it's probably worth keeping, although perhaps narrowing the scope as in the previous item.)

@RedYetiDev
Copy link
Member Author

RedYetiDev commented Jul 14, 2024

  1. ...

Got it! I've adjusted the comment

  1. ...

While I like the idea of this, every team on the CODEOWNERS file would need to be given triage access or higher to this repository. (I'm aware the collaborator team gives all members that access, but it would need to be done on the team level)

  1. ...
  2. ...

Maybe the TSC could meet to decide these kind of larger decisions?


All in all, I think that the future of review requests should be discussed, and if it's to be continued via a comment, handling that via GitHub actions is a good idea.

@RedYetiDev
Copy link
Member Author

RedYetiDev commented Jul 17, 2024

I've opened an issue in nodejs/admin#895 which will address your comments. The only reason reviews can't be used is because the all-members team doesn't have triage access to this repo (at that level). By changing that, the review request feature can be used.

@RedYetiDev RedYetiDev added blocked PRs that are blocked by other issues or PRs. and removed review wanted PRs that need reviews. labels Jul 17, 2024
@RedYetiDev
Copy link
Member Author

Blocking until that issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked PRs that are blocked by other issues or PRs. meta Issues and PRs related to the general management of the project. tools Issues and PRs related to the tools directory.
8 participants