Skip to content

pull-requests.md: add guidance for large and/or automatic edits #8451

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pohly
Copy link
Contributor

@pohly pohly commented May 8, 2025

This primarily came out of the discussion around allowing the use of LLMs (kubernetes/steering#291), but isn't limited to it because other tools (search/replace, linters) can have the same effect.

The goal is to clarify expected behavior and to give reviewers something that they can link to when they decide that a PR shouldn't get merged.

Which issue(s) this PR fixes:
Fixes kubernetes/steering#291

/cc @kubernetes/steering-committee @danwinship

@k8s-ci-robot k8s-ci-robot requested a review from danwinship May 8, 2025 13:27
@k8s-ci-robot
Copy link
Contributor

@pohly: GitHub didn't allow me to request PR reviews from the following users: kubernetes/steering-committee.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

This primarily came out of the discussion around allowing the use of LLMs (kubernetes/steering#291), but isn't limited to it because other tools (search/replace, linters) can have the same effect.

The goal is to clarify expected behavior and to give reviewers something that they can link to when they decide that a PR shouldn't get merged.

Which issue(s) this PR fixes:
Fixes kubernetes/steering#291

/cc @kubernetes/steering-committee @danwinship

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/contributor-guide Issues or PRs related to the contributor guide approved Indicates a PR has been approved by an approver from all required OWNERS files. sig/contributor-experience Categorizes an issue or PR as relevant to SIG Contributor Experience. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 8, 2025
reference to this documentation if they come to the conclusion that the Pull
Request is not worth the effort.

## Fixing Linter Issues
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs guidelines are to use lower case in section titles, but this document is different. I used the opportunity to make this section title consistent and also added it to the TOC.


Some tools make it very easy to create large Pull Requests, for example:
- global search/replace
- linters which automatically correct issues (see also next section)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(parts of this are also redundant with the earlier section "Don't Open Pull Requests That Span the Whole Repository")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. I think they are a complimentary, so I cross-referenced them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 615 to 617
Please understand that reviewers may decide to close a Pull Request with a
reference to this documentation if they come to the conclusion that the Pull
Request is not worth the effort.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe clarify what that means a little more?

Suggested change
Please understand that reviewers may decide to close a Pull Request with a
reference to this documentation if they come to the conclusion that the Pull
Request is not worth the effort.
Please understand that reviewers may decide to close a Pull Request with a
reference to this documentation if they come to the conclusion that the
difficulty of properly reviewing the Pull Request outweighs the benefit that
the PR provides.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, added.

@pohly pohly force-pushed the pr-guidelines-large-automatic-edits branch from 316bb29 to f67a105 Compare May 9, 2025 06:32
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 9, 2025
Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/hold
so other steering members can weigh in

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 13, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 13, 2025
- large language models (LLMs) which generate code or documentation

To make it easier for reviewers to handle such Pull Requests, please explain
how it was generated in the "Special notes for your reviewer" section of the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add some suggestions/questions in current Pull Request template for this part?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hesitant about that. The template is pretty long

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be more than happy to drop the "Documentation" section from the template, but that's a different discussion...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree our current template is already long. This is more for contributors to use when they are closing PRs, so they don't have to repeat the same thing over and over again, but rather just use a "saved reply" feature from GH.

@pacoxu
Copy link
Member

pacoxu commented May 14, 2025

/approve

Request to ensure that the change is correct (to the best of your knowledge),
and that making the change improves the project enough to justify the cost that
is needed to review and merge the Pull Request (see previous section). If
unsure, add a "RFC: " (request for comments) or "WIP: " (work in progress) prefix
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WIP: has meaning to our CI in a way RFC: does not

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are both not mentioned elsewhere in the document. I was wondering whether they deserve a more complete description and then decided against it because this didn't look like the right place for it. But perhaps a few more sentence are fine?

RFC is merely informational. WIP also prevents merging accidentally. To avoid running tests before the Pull Request is ready, create a Draft Pull Request, in which case /test can be used to trigger only specific test jobs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of RFC, just call it a draft PR, which is a GH feature that is even better than WIP, b/c it doesn't run any tests automatically, but rather relies on PR author to explicitly request them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, mentioning one option here that has the desired effect is better than trying to cover all of them. Changed to:

If unsure, create a draft Pull Request and ask for guidance.

Copy link
Contributor Author

@pohly pohly May 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unsure whether I should use "Draft Pull Request" or "draft Pull Request". The document uses "Pull Request", but it wasn't entirely clear to me why capital letters where chosen - I just did the same to be consistent. But "draft" is not used elsewhere, so I decided to use the normal spelling.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have a debate over a single character difference 😝 ...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GH UI has "Draft Pull Request" as the button you'll see normally, instead of "Create Pull Request" so let's go with that 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's styling in the web UI. In normal prose, GitHub doesn't capitalize: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews

But I agree, we probably used "Pull Request" because of the button, so let's stay consistent. Changed...

@pohly pohly force-pushed the pr-guidelines-large-automatic-edits branch from f67a105 to 3cb90ee Compare May 14, 2025 12:13
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 14, 2025
Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still lgtm, modulo that nit

Request to ensure that the change is correct (to the best of your knowledge),
and that making the change improves the project enough to justify the cost that
is needed to review and merge the Pull Request (see previous section). If
unsure, create a draft Pull Request and ask for guidance.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unsure, create a draft Pull Request and ask for guidance.
unsure, create a Draft Pull Request and ask for guidance.

as mentioned elsewhere, this will be consistent with github UI, ie. we won't have to explain it 😉

This primarily came out of the discussion around allowing the use of
LLMs (kubernetes/steering#291), but isn't limited to
it because other tools (search/replace, linters) can have the same effect.

The goal is to clarify expected behavior and to give reviewers something that
they can link to when they decide that a PR shouldn't get merged.
@pohly pohly force-pushed the pr-guidelines-large-automatic-edits branch from 3cb90ee to c738487 Compare May 15, 2025 11:36
Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 16, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pacoxu, pohly, soltysh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/contributor-guide Issues or PRs related to the contributor guide cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/contributor-experience Categorizes an issue or PR as relevant to SIG Contributor Experience. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Guidance on Generative AI usage in Kubernetes Github Orgs
6 participants