Skip to content

Commit 741ac38

Browse files
authored
contributing: advice from recent RTI learnings
* contributing: advice from recent RTI learnings * patches are optional if Gerrit has the change
1 parent e732140 commit 741ac38

File tree

1 file changed

+52
-7
lines changed

1 file changed

+52
-7
lines changed

docs/contributing/index.md

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,26 +227,58 @@ First, in the issue(s) you created in the bug tracker, make sure you have:
227227

228228
You should have a full clean build of the gate with your changes applied. This
229229
currently means a successful build with GCC 10 as the primary compiler, and
230-
GCC 7 and smatch as shadow compilers, with no warnings or errors in the
231-
resulting `mail_msg`.
230+
GCC 14 and smatch as shadow compilers, with no warnings or errors in the
231+
resulting `mail_msg`. Note that `mail_msg` includes a diff against the previous
232+
build, so your patch's clean build should come directly after a clean build of
233+
the previous commit.
234+
235+
If your commit does not yet include "Reviewed by:" indicating your reviewers,
236+
this is when you should add those lines. We do not have a blank line between the
237+
first line of a commit message in illumos, and the following "Reviewed by:"
238+
lines. If you run `git format-patch` to get a patch to include, this will
239+
result in an oddly-formatted "Subject:" line - that is expected and OK.
240+
241+
!!! note Assembling "Reviewed by:" lines
242+
If your review is not through Gerrit, you should have contact information
243+
for your reviewers that can be included when adding "Reviewed by:" lines. If
244+
your review is through Gerrit, you can use the Gerrit [/changes
245+
API](https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#get-change-detail)
246+
to get reviewer information and reduce the risk of a transcription error for
247+
your reviewers' names or e-mail addresses. This jq is an example of how you
248+
might want to assemble "Reviewed by:" lines:
249+
250+
```
251+
curl -s "https://code.illumos.org/changes/$YOUR_CHANGE_NUMBER?o=LABELS&o=DETAILED_ACCOUNTS" | \
252+
tail -n 1 | \
253+
jq -r '.labels."Code-Review".all[] |
254+
select(.value==1) |
255+
"Reviewed by: \(.name) <\(.email)>"'
256+
```
257+
258+
If your change has been reviewed on Gerrit, you (or `git pbchk`) may have found
259+
trivial changes such as whitespace nits, comment spelling, or copyright dates
260+
since the last round of review. Please ensure any changes at this point are
261+
also pushed to Gerrit. If your changes on Gerrit are the same as you would
262+
include as a patch for integration, you can omit the patch from your RTI e-mail
263+
entirely; the core team can fetch your change from Gerrit as well.
232264

233265
Your RTI e-mail should include:
234266

235267
* The link to the illumos issue(s) you're fixing, e.g.,
236268
https://illumos.org/issues/10052
237-
* A link to the changes that were reviewed; e.g., a link to your
238-
[Gerrit](./gerrit) review
269+
* The changes that were reviewed; e.g., a link to your [Gerrit](./gerrit)
270+
review, or an attached patch otherwise.
239271
* The full "change set description" (i.e., `git whatchanged -v origin/master..`)
240272
including:
241273
* Issue number(s) and description(s)
242274
* `Reviewed by: First Last <[email protected]>` lines
243275
* List of files affected
244-
* Output of `git pbchk` (run under `bldenv` or have `/opt/onbld/bin` in `PATH`)
276+
* Output of `git pbchk` (run under `bldenv` or have `/opt/onbld/bin` in `PATH`).
277+
This is optional if `git pbchk` prints nothing and exits with 0
245278
* An attached clean `mail_msg` from a full nightly build (including shadow
246279
compilers, as noted above)
247280
* Information about how the changes were tested (it's sufficient to
248281
mention that the testing notes appear in the bug tracker)
249-
* Your changes attached as a patch as per `git format-patch`
250282

251283
Here is an example change description:
252284

@@ -256,10 +288,18 @@ Reviewed by: Jack <[email protected]>
256288
Reviewed by: Ohana Matsumae <[email protected]>
257289
```
258290

291+
Note this description does not include a "Change-ID:" line - it is the
292+
description the commit should have when integrated, minus "Approved by:". Since
293+
Gerrit identifies changes with the "Change-ID:" line, this will be a little
294+
different from the description in the associated Gerrit link. This is okay! If
295+
your RTI is approved, the core team member integrating your patch will remove
296+
this line from the description when they add an "Approved by:" recording their
297+
approval.
298+
259299
!!! note Amending descriptions
260300
You can use `git commit --amend` to edit the commit message.
261301

262-
An [core team member](../about/leadership#core-team) will need to judge whether
302+
A [core team member](../about/leadership#core-team) will need to judge whether
263303
your code review and testing are adequate for the scope of changes you propose.
264304
Note that the core team members's job as part of integration is not necessarily
265305
to review your code again, only to judge whether review and testing was
@@ -290,3 +330,8 @@ you" for being part of the illumos developer community!
290330
If the change is accepted, the core team will take care of actually committing
291331
to master. Regular contributors may get commit rights: they follow the same
292332
system, but may push to master themselves after approval.
333+
334+
If your review was through Gerrit, one last step is to "Abandon" your change -
335+
because the patch is intgrated through the RTI process, we don't use Gerrit to
336+
merge. "integrated" is a good message to indicate to future readers that the
337+
change was, in fact, integrated.

0 commit comments

Comments
 (0)