You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributors/guide/pull-requests.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ It should serve as a reference for all contributors, and be useful especially to
26
26
-[Is the feature wanted? File a Kubernetes Enhancement Proposal](#is-the-feature-wanted-file-a-kubernetes-enhancement-proposal)
27
27
-[Smaller Is Better: Small Commits, Small Pull Requests](#smaller-is-better-small-commits-small-pull-requests)
28
28
-[Open a Different Pull Request for Fixes and Generic Features](#open-a-different-pull-request-for-fixes-and-generic-features)
29
+
-[Don't Open Pull Requests That Span the Whole Repository](#dont-open-pull-requests-that-span-the-whole-repository)
29
30
-[Comments Matter](#comments-matter)
30
31
-[Test](#test)
31
32
-[Squashing](#squashing)
@@ -249,6 +250,31 @@ Likewise, if Feature-X is similar in form to Feature-W which was checked in last
249
250
Feature-X.
250
251
(Do that in its own commit or pull request, please.)
251
252
253
+
## Don't Open Pull Requests That Span the Whole Repository
254
+
255
+
Often a new contributor will find some problem that exists in many places across the main
256
+
`kubernetes/kubernetes` repository, and file a PR to fix it everywhere at once. Maybe
257
+
there's a cool new function in the latest golang release that everyone ought to be using,
258
+
or a recently-deprecated function that ought to be replaced with calls to its replacement.
259
+
Sometimes a contributor will run a linter or security scanner across the code to find
260
+
problems, or fix a particular spelling mistake in comments or variable names. (It's
261
+
"deprecated", not "depreciated"!)
262
+
263
+
The problem with this approach is that different parts of `kubernetes/kubernetes` are
264
+
maintained by different SIGs, and so changes to those different parts require approvals
265
+
from different people. A PR containing 20 one-line changes scattered across the repository
266
+
could end up needing 5 or 10 approvals or more before it can be merged. (While there are a
267
+
handful of people who can approve changes across large portions of the repository, those
268
+
are generally the people who are the most busy and hardest to get reviews from, especially
269
+
when you're a new contributor with no connections within the community yet.)
270
+
271
+
If you really want to try to get such a PR merged, your best bet is to break up the PR
272
+
into separate PRs for each SIG whose code it touches. You can look at the `OWNERS` files
273
+
in a directory (or its parent directory) to see who owns that code, and then group the
274
+
changes together accordingly (e.g., with one PR touching files in `cmd/kube-proxy` and
275
+
`pkg/util/iptables`, which are owned by SIG Network, and another PR touching files in
276
+
`pkg/kubelet` and `pkg/controller/nodelifecycle`, which are owned by SIG Node.)
277
+
252
278
## Comments Matter
253
279
254
280
In your code, if someone might not understand why you did something (or you won't remember why later), comment it. Many code-review comments are about this exact issue.
0 commit comments