Wireshark Development Workflow
This page is an overview. For actual instructions on how to use Git and Gerrit to submit patches, see Development/SubmittingPatches.
If you have questions, comments regarding the workflow, please send a message to the [email protected] mailing list.
The Wireshark (formerly Ethereal) project was started by Gerald Combs and welcomes patches from external contributors. Over the years, ~50 contributors have been given write access to the version control system (first to CVS then to Subversion), they are known as the Core Developers.
Most of Wireshark's code resides in packet-decoding logic, a.k.a dissectors, spread across many files. There are no official owners of source code or functional subsystems. Developers work on parts of the code based on their interests and needs.
Prior to the introduction of Gerrit, Core Developers committed code directly to the version control system without code review, but the commits were monitored via the [email protected] list for spotting trivial problems. Some of the changes were discussed in advance, especially intrusive ones. Contributors without commit rights submitted their patches through BugZilla or the [email protected] mailing list, and those changes were reviewed by at least one Core Developer before being committed. Wireshark is built and tested on several architectures automatically after each commit by BuildBot.
Accepting And Committing Changes
Wireshark's code is version managed in Git at https://code.wireshark.org/review/gitweb?p=wireshark.git;a=summary. If you are not familiar with Git, please read Pro Git. Master is the main development branch and master-1.10, master-1.8, etc. are for maintaining the contents of stable release branches like Wireshark 1.10.x, 1.8.x, etc. respectively. Released versions are tagged as wireshark-<release version>, e.g. wireshark-1.8.8.
Every change to the officially managed branches goes through code review using Gerrit at https://code.wireshark.org/review/. Please submit your changes through Gerrit instead of BugZilla. If you would like to provide an example capture file along with patch, please open a bug in BugZilla and refer to it in the commit message (... bug 1234 ...). By attaching the capture file to a bug it will automatically become part of the regression suite and will be tested regularly.
If you are not familiar with Gerrit, please read this guide. The changes submitted for review can be committed (using Gerrit's "Submit Change" button) to the target branch after all the following criteria are met:
At least one Core Developer gives a +2. (Core Developers can bypass peer review for trivial changes by giving +2 for their own commits). Although non-core developers can add +1 to a review, these do not accumulate (two +1's does not make a +2) so a Core Developer must be involved in every final commit (see here for details).
No Core Developer gives a -2. (There should be no one strongly opposing the change. Disagreements can be resolved in Gerrit comments, on the mailing lists, or any other way.
Code is building and tests are passing on all platforms. (Tests automatically start when a change set is created or updated. Note that there may be tests which are not run for changes under review, just for the branches.)The automatic build is not in place yet. The "Verified" flag has to be set after performing a clean build manually.
After all the criteria are met any Core Developer can push the "Submit Change" button; integration to the target branch does not happen automatically.
Changes are cherry-picked to the target branch by Gerrit to keep the history linear. The rationale behind this is that while merging would reflect the history more accurately, linear history is easier to interpret by humans. Changes with dependencies are cherry-picked after all dependencies are cherry-picked, too. When a cherry-pick can't be done without conflict, the change needs to be updated in the review.
In case of integrating very long branches where cherry-picking would not be feasible merge can be performed outside of Gerrit and the result can be "git push"-ed to the the target branch, but only Gerald and Developers officially selected by him have the rights to push the merge commit.
After each branch change (when a review is finished integrating the change or a new commit is pushed to a branch) all builds and tests are triggered to test the new state. This run includes builds and tests which are omitted for changes under review.
Q: Why does the project use Git?
A: It was a project decision based on many discussions. Some pointers:
Q: Why does the project use Gerrit (why not e.g. GitHub)?
A: Git allows projects to choose from several typical workflows for collaboration. One is the dictator and lieutenants model followed by the Linux project, where the first line of integration is done by a selected set of developers (lieutenants) responsible for functional areas of the code and the final integrator is the dictator. GitHub emphasizes the social aspect of development and helps this model by implementing pull request and merge based collaboration. In the Wireshark development model on the other hand, functional-area-based code ownership is not very strong and every Core Developer tends to review any kind of change. Gerrit helps in implementing exactly this kind of workflow, where integration is done by peer-review. It is worth noting that in peer-review based integration there is no similar role to the dictator who can be a bottleneck sometimes. Her/his part of role is implemented by Gerrit itself. Gerrit is used by other big projects (LibreOffice, Android, etc.) with similar development structure.
Wireshark's Gerrit site