From Fedora Project Wiki

< Anaconda

Revision as of 20:24, 20 January 2015 by M4rtink (talk | contribs) (Initial update - improve mailing list submission howto, add info about pull requests and add a section for the 24 hour rule)

Anaconda Patch Review Process

To improve the quality of commits and reduce the number of typos introduced into the anaconda source, Anaconda has a mandatory patch review process. The intent is to keep this very light-weight while still increasing visibility for changes.

Note that review is no substitute for having tested your code and so you should still do that even before the submission of the code for review.

How to Submit Changes for Review

Preparing changes to be submitted

For "final" review of patches, it is best to have a local git tree to which you have committed your changes as a set of patches. If it is a small change, one commit may be sufficient. Larger changes should be broken into a regular patch series in which at each subsequent stage of patch application, the whole is usable and testable.

Please also make sure that there is a usable commit message along with each commit. These should be formatted with a simple summary (~ 70 characters or less), a blank line and then a lengthier description (if necessary).

Once your changes changes are ready to be submitted and reviewed, you can either send them as patches to the anaconda-devel-list mailing list or submit them as a pull request to the Anaconda repository on Github.

Sending patches to the mailing list

The mailing list used for Aaconda patch review is called (listinfo, archive) and you need to be subscribed to the list or else your emails will be rejected. The mandatory subscription was introduced to reduce the amount of SPAM email on the list.

You can use git format-patch from the command line to generate patches in a suitable format:

  git format-patch origin/master

This will spit out a series of files named 000x-foo containing your patches. After checking that the content of these files looks reasonable you can send the patches to anaconda-devel-list for review with a command like

  git send-email --to --suppress-from \
 --compose <patch files here>

This will let you compose an introductory mail for the patch series; if this is a single patch, you can likely send without --compose as your commit message should be enough to make it clear what you are trying to fix.

Sending a pull request

The second options fur submitting changes to the Anaconda project is by using the GitHub pull request mechanism.

To submit a change begin by forking the Anaconda repository on GitHub. Then create a "feature" branch in your forked repository and add your changes as one or more commits in the branch. Once done, submit your "feature" branch as a pull request to the main Anaconda repo.

Review Process

The 24 hour rule

As the Anaconda contributors are widely distributed across many timezones, there is a simple rule in place to assure all people have an adequate chance to see and review any proposed changes before they are pushed to the source code repository:

Wait at least 24 hours after proposing a change before pushing it to the source code repository.

This explains why your change might not yet been pushed even after being approved by one of the Anaconda contributors participating on the review. The contributor thinks the change is fine, but makes sure that others also have chance to review the patch.

24 hours it the minimum amount - especially for larger changes or something which might be expected to be controversial a longer time window needs to be expected. We aren't at this time going to put any strong constraints on how many reviews are needed or anything of that sort, though. Use your best judgement.

Misc Tips

Git Configuration Tips

To make all of this work easily with git, you should set up some basic config options with git config --global. Options that are good to set are,, and sendemail.smtpserver

Install the git-email package

On Fedora 18, the git send-email command is not included in the main git package; install the git-email package to get it.

Syntax Checking of Code

Thanks to Hans's hard work, we now have a workable pychecker config again; pleas be sure to run the script and ensure that your code does not introduce any new syntax errors.