wiki:PatchReview

Overview of the patch review process

All patches needs to receive an ACK (Acknowledged) before being accepted in to the Git repository. To encourage participation from non-developers the ACK is split into two parts:

  • "This patch does the right thing ACK". Also known as feature ACK. One does not have to be a developer to give this ACK.
  • "This patch does the thing (it does) right". Also known as code quality ACK. People who understand the code can give this.

Note that both ACKs can be given by a single person.

The ACK process is used to ensure that only useful and high-quality code gets into OpenVPN. Hopefully that will make it easier for those who don't feel they are "good enough" developers to try to send patches anyway.

This whole review process is to give and receive feedback, where we as a community can help making OpenVPN better - together. For example, the more experienced developers can share their advices to those who are less experienced. Those being less experienced can share their understanding of the code as well, which might shed some light to issues or solutions which are better. Non-developers can also participate by sharing their expertise on OpenVPN in general by giving feature ACKs (NACKs) when applicable. This way everyone can learn something and hopefully even get wiser.

To explain the Signed-off-by and Acked-by process a bit further. In git you have "data fields" which are populated automatically when commits are done, author and commiter. The commiter will be the one who applies patches from the mailing list or the one doing commits to a tree which are fetched via the remote access features in git.

Then you have the author field which is either present in the patch file itself. This field might be missing if git format-patch has not been used to create the patch file sent to the mailing list. In these cases, it is expected that the author of the patch is the same as the sender - unless the commit message in the patch indicates something else.

If the author information is present, the sender field will be treated differently as well, in those cases where someone sends a patch on behalf of somebody else.

So to summarize, we track these fields almost automatically:

  • author - information about the person who wrote the patch
  • sender - information about who sent / forwarded the patch for inclusion
  • committer - information about who applied the patch to the git tree

Then a patch author sends his patch to somewhere, he should make sure it contains a 'Signed-off-by: {Full name} <email@…>' line in the commit text. This is to officially announce that declare that this patch is ready for further processing. When doing git commits, you can add this indication automatically by doing 'git commit -s' (or --signed-off).

The one who receives the patch and finds it good to go even further (if want you do some kind of "internal" review before sending it further to the public) will add his/hers "Signed-off-by" reference as well when sending further again. This way we can track who have been looking at the patch. And the more people who have eye-balled the patch and adds their "Signed-off" line to the patch, the better! By doing so, the reviewer indicates that the patch is good.

Before it goes into the tree, a final "Acked-by:" note is added, indicating who accepted it for inclusion into the tree,

Example of patch submission and the review process

Lets say John Doe writes a patch, sends it to Jane Doe and she sends it Bob Boss for inclusion. The process would be something like this:

John Doe:

\tAuthor: John Doe <john.doe@example.com>

        Short summary of the patch

\tA more detailed description of this patch fixing x.y.z.  This can
        even span over several lines to explain the patch.

\tSigned-off-by: John Doe <john.doe@example.com>

\t<the patch itself>

Jane Doe will send it further as:

\tAuthor: John Doe <john.doe@example.com>

        Short summary of the patch

\tA more detailed description of this patch fixing x.y.z.  This can
        even span over several lines to explain the patch.

\tSigned-off-by: John Doe <john.doe@example.com>
\tSigned-off-by: Jane Doe <jane@doe.net>

\t<the patch itself>

When Bob Boss ACK's the patch, the final commit to be found in the source code repository will be:

\tAuthor: John Doe <john.doe@example.com>

        Short summary of the patch

\tA more detailed description of this patch fixing x.y.z.  This can
        even span over several lines to explain the patch.

\tSigned-off-by: John Doe <john.doe@example.com>
\tSigned-off-by: Jane Doe <jane@doe.net>
\tAcked-by: Bob Boss <bob@bigbucks.com>
\tSigned-off-by: David Sommerseth <dazo@users.sourceforge.net>


\t<the patch itself>

The Acked-by: can be the one who does the final commit to the source code repository, but it can also be someone who don't do the final commit. The last Signed-off-by should normally be the person the one who does the final commit. This is usually the person who "touched" the patch by adding the Acked-by line(s).

However, you should not see any commits which is written by (author) and Acked-by by the same person. Then the process have failed to give a qualified review.

You may ask why we have this "bureaucracy" (which is a fair question!). It is simply to keep all who send in patches, those who reviews them and finally accepts them into the source code repository more accountable for their work. This process will document each accepted patch and give an indication that it has been through a certain set of reviews. This is to ensure that we don't accept bad code easily into the source code repository. This is just to keep this project as transparent and open as possible.

Last modified 7 years ago Last modified on 02/07/17 09:30:12