Repository navigation
Introduce triage system - #3126
Conversation
8952f7c to
a145f3a
Compare
There was a problem hiding this comment.
Not directly related to this PR -- I feel like this file could use a rehaul. The first 4 sections, Introduction, Architecture, License, and Artifacts don't directly relate to the contribution process and probably should live in a different document. It makes our actual contribution process more difficult to find for readers (they have to scroll down fairly far on this page to get to the meat of it).
@NVIDIA/gpu-operator-dev thoughts? I would be in favor of removing this content and jumping straight to the contribution process / AI usage guidelines.
There was a problem hiding this comment.
Thoughts on moving main's CONTRIBUTING.md's architecture and artifacts section to the README and deleting the rest of the old sections (apart from Signing your work)?
There was a problem hiding this comment.
I don't find the architecture or artifacts sections too helpful to be honest. I would be fine removing all of the sections. Our product documentation should suffice, which lists all of our artifacts and the operands we support. If we want to write actual architectural documents, they could live in the docs/ folder.
There was a problem hiding this comment.
I'm in favor of keeping these sections somewhere in the codebase. AI agents (and humans) don't always check official docs external to a codebase (even if linked in /docs). Including a brief overview like this one in /docs would be helpful.
| const hasWriteAccess = async (username) => { | ||
| try { | ||
| const { data } = await github.rest.repos.getCollaboratorPermissionLevel({ owner, repo, username }); | ||
| return ['admin', 'maintain', 'write'].includes(data.permission); | ||
| } catch (error) { | ||
| if (error.status === 404) { | ||
| return false; | ||
| } | ||
| throw error; | ||
| } | ||
| }; | ||
|
|
||
| if (['OWNER', 'MEMBER'].includes(pr.author_association) || await hasWriteAccess(author)) { | ||
| return; | ||
| } | ||
| // A maintainer reopening a closed pull request overrides the check. | ||
| if (context.payload.action === 'reopened' && await hasWriteAccess(context.payload.sender.login)) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Could this code block be replaced by the below if statement attached to the job itself?
if: >-
!contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'),
github.event.pull_request.author_association)
I believe this would prevent the job from running when any user with write access to the repo opens or reopens a PR.
There was a problem hiding this comment.
Yeah, it makes more sense to allow anyone in the NVIDIA org/with write access and not just gpu-operator-dev to open PRs. We should also exempt bots like dependabot from this:
if: >-
github.event.pull_request.user.type != 'Bot' &&
!contains(fromJSON('["OWNER","MEMBER"]'), github.event.pull_request.author_association)
The only problem I can see is that if maintainers reopen a PR that was closed by this bot which references an unapproved issue. This is a very narrow case though and probably is not that relevant; it should not be happening in the first place. Added this.
There was a problem hiding this comment.
Thoughts on replacing the current logic (which runs the if statements in the script), with the below?
if: >-
github.event.pull_request.user.type != 'Bot' &&
!contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.pull_request.author_association)
"OWNER","MEMBER","COLLABORATOR" cover everyone with write access to the repo. Another benefit of this approach is that is avoids the extra GitHub API call in hasWriteAccess()
There was a problem hiding this comment.
Missed actually applying this. I've applied it now.
There was a problem hiding this comment.
@cdesiniotis @aryangorwade I have a question with the suggestion to use the user type, if users have their membership set as private (I checked mine and it seems to be private), then the code that calls this I think needs to be authenticated as an NVIDIA org member to view private membership otherwise it marks the author as CONTRIBUTOR. I checked the following
| PR author | With my login | Without login (anonymous) |
|---|---|---|
| kvalliyurnatt | MEMBER | CONTRIBUTOR |
| tariq1890 | MEMBER | CONTRIBUTOR |
| aryangorwade | MEMBER | CONTRIBUTOR |
This is what I called curl -s https://api.github.com/repos/NVIDIA/gpu-operator/pulls/3145 | jq .author_association
Do we know whatever calls the code in github actions will have the right permissions to see private memberships ?
There was a problem hiding this comment.
@kvalliyurnatt good catch. We could consider providing the script an authenticated token but that still would not work.
TLDR: We could just check the author's repo permission (write/maintain/admin access). Downside is other members of NVIDIA org that do not have such access will have their PRs closed. Is this approach worth it?
An other option is to check NVIDIA org: GET /orgs/NVIDIA/members/{user}. We'd have to set up a GitHub app in the org settings and configure it on our repos, and then generate. private key and a workflow. This is a decent amount of work for what seems like a simple problem.
We could fetch the PR again with an NVIDIA member's token but this would need one of our tokens. Not a big fan of this one.
There was a problem hiding this comment.
@NVIDIA/gpu-operator-dev Thoughts on gating PRs only to members with write access for now (our team)? To get the triage PR in as soon as possible? Using a GitHub app to gate access to NVIDIA org members is a better but more complex solution we can look into implementing right after we get this change in.
There was a problem hiding this comment.
I think to not block the PR, I would be okay with it.
Walkthrough
Priority: Merge Risk:
|
a145f3a to
6fe37ba
Compare
c7d1b2b to
6f4445d
Compare
6f4445d to
1da5668
Compare
e183c2d to
1f6946e
Compare
0d2f269 to
404d5d8
Compare
|
|
||
| 1. **Open an issue.** Use the bug report template to report a defect, or the feature request template to propose new behavior or a [major change](GOVERNANCE.md#core-decisions). Indicate if you want to work on the issue. Each new issue gets the `needs-triage` label. | ||
| 2. **Wait for triage.** A maintainer reviews the issue against the [triage criteria](#triage-criteria). The maintainer then labels the issue `accepted`, `needs-more-info`, or closes it. | ||
| 3. **Claim the issue.** When an issue is `accepted`, comment on it expressing interest and summarizing your proposed solution. Issue authors have priority if they indicate they would like to work on it. Other claims are first-come, first-served. A maintainer discusses your plan with you and assigns the issue to you when the plan is ready. |
There was a problem hiding this comment.
Should we define when to unassign inactive contributors? For example, follow up after 2 weeks of inactivity and unassign if there's no response, keeping the issue open for others to pick up.
404d5d8 to
7ef11aa
Compare
| **Motivation** | ||
| <!-- A clear and concise description of your motivation: is this a real issue you ran into while using the product? --> | ||
|
|
||
| **Would you like to work on this issue?** |
There was a problem hiding this comment.
Instead of a yes/no. Can we make it a checkbox? The message would look something like
| **Would you like to work on this issue?** | |
| **Check here if you would look like to work on this issue** |
| <!-- A clear and concise description of your motivation: e.g. would this feature greatly help your use-case, and why? --> | ||
|
|
||
| <!-- A clear and concise description of the feature request. Please outline the motivation for the proposal. Is your feature request related to a specific problem? e.g., *"I'm working on X and would like Y to be possible"*. If this is related to another GitHub issue, please link it here too. --> | ||
| **Would you like to work on this issue?** |
There was a problem hiding this comment.
Devin Review found 1 new potential issue.
🐛 1 issue in files not directly in the diff
🐛 Unapproved pull requests remain open
External authors can open pull requests without an assigned, accepted issue because PR Gatekeeper no longer runs. No remaining workflow closes these pull requests.
| NVIDIA is willing to work with partners for adding platform support for the GPU Operator. The GPU Operator is open-source and permissively licensed under the Apache 2.0 license with only minimal requirements for source code [contributions](#signing). | ||
|
|
||
| To file feature requests, bugs, or questions, submit an issue at https://github.com/NVIDIA/gpu-operator/issues | ||
| To file feature requests or bugs, submit an issue at https://github.com/NVIDIA/gpu-operator/issues. For questions, start a discussion at https://github.com/NVIDIA/gpu-operator/discussions or ask in the `#gpu-operator` channel in our community Slack at https://inviter.co/dsx-ai-factory. |
There was a problem hiding this comment.
Should we link SECURITY.md here so contributors know where to report security vulnerabilities instead of opening public issues?
dfa9480 to
f93bea1
Compare
Signed-off-by: Aryan Gorwade <gorwadearyan@gmail.com>
f93bea1 to
a49a712
Compare
Description
This PR implements a triage system adapted from the one mentioned in #572. Commit-by-commit summary of changes made:
CONTRIBUTING.mdlisting when maintainers may close contributions without review. Tells agents inAGENTS.mdnot to write issue or PR descriptions or replies to maintainers.CONTRIBUTING.md. Adds Motivation and "work on this issue" fields to the issue templates and an issue link to the PR template. Turns template guidance into HTML comments so it doesn't appear in posted issues. UpdatesGOVERNANCE.md,AGENTS.md, andREADME.mdto match.README.md, andCONTRIBUTING.md.needs-more-infoissues after 30 days without activity. Exemptsacceptedissues from the 90-day rule.needs-triagewhen they arrive without a state label.acceptedissues by commenting/assign @user, replacing any previous non-maintainer assignee.Checklist
make lint)