December 12, 2012
Gerrit Code Review has been updated
By: Steffen Gebert
During the typo3.org Code Sprint in Wiesbaden last weekend, the Gerrit installation at review.typo3.org has been upgraded.
(Gerrit's new logo)
Changes for users
Coming from Gerrit 2.2, we skipped two minor versions and updated to version 2.5, released a couple of weeks ago.
The major new features for you, mostly brought throw the version upgrades, are:
- UI improvements
- Improved search (with auto-completion for search operators)
- Improved diff views (layout changes, download of changed files)
- Patches included in notification emails
- Cloning possible through HTTP(S) on git.typo3.org
- Cloning/pushing possible through HTTPS review.typo3.org, also with the typo3.org password (previously, user was forced to create a special HTTP password in Gerrit)
- Drafts: Patches pushed to the refs/drafts/<branchname> refspec (instead of refs/for/<branchname>) are explicitly marked as "Draft", are private, not meant for regular review and cannot be submitted, yet. They can be made public by hitting the "Publish" button.
- Submodule subscriptions: Commits "Raise submodule Pointers" (like this) should not be needed anymore. If we got it right, Gerrit tracks git submodules internally and automatically increases pointers, if the .gitmodules file points to a branch, not a commit (sth. which still has to be done for e.g. TYPO3 CMS Core).
- A REST API.
(see also the release notes for Gerrit 2.3, 2.4, and 2.5)
Leader and Member split
Team members still have the same privileges as before. However, the new Leaders groups (containing the project leaders, as you might expect) has escalated privileges, namely: Creating lightweight and annotated tags, creating branches (through the web interface and through git push), uploading commits of others, and abandoning changes of others (closing the change request).
Furthermore, the leaders are the owners of the Gerrit project, enabling them to adjust the access controls, thus e.g. permitting to bypass core reviews for team members.
Improved server setup
During the past couple of months, we worked on a Gerrit cookbook for Chef. The result can be found on our typo3-cookbooks page at github. More improvements to that cookbook will come and we are looking forward to interact with the Chef and Gerrit communities.
Outlook
- Gerrit 2.6 will likely be released in January. It will feature more UI improvements, like online-editing of commit messages (while keeping the votings, or an intelligent "Rebase" button).
- Andy Grunwald was working on a better TravisCI integration to run tests for every pushed change set. Having a recent PHP version available on the server now allows us to better support his efforts.
- Bastian Bringenberg is working towards bringing a message queue (namely RabbitMQ) into our infrastructure. This enables us to build better, quicker, but less dependent communication between services, e.g. creating a new Gerrit project / git repository when a new forge project is created or not synchronizing team memberships from forge to Gerrit by cron every 30 minutes, but directly after a membership change in forge.
- We collected experience with the permissions of Git repos in Gerrit and what people in our community want to do during the "beta" phase with a couple of community extensions. That's why we gave at least team leaders way more rights and also the possibility to adjust them on their own (see appendix for further explanation).
- Having the leader/member split was an important step to prevent headaches for our Git users. Before announcing general availability of Git for community extensions, we want to incorporate one change: TYPO3v4 and FLOW3 are no good names in paths for the repos. Once we agree on a directory hierarchy reflecting the structure of the TYPO3 universe, we are happy to create repositories for you.
If you are curious, what else will happen next and want to influence the future of the TYPO3 infrastructure, please get in touch with us through admin(at)typo3.org. We are happy to receive help!
Steffen Gebert
On behalf of the TYPO3 Server Admin Team
Appendix: Modifying Gerrit permissions
As explained before, team leaders now have the possibilty to modify access control settings of their Gerrit projects on their own. Please keep in mind that you make us unhappy, when you screw them up too often - so please be careful!
Gerrit's access control settings are pretty well documented.
Paths in Git/Gerrit:
- refs/heads/* means direct access to the Git repository.
- refs/for/refs/heads/* ends up in a Gerrit change request, not directly in the Git repository.‚
Having Push permission to a certain path means that one can push changes to that path. In case of refs/for/refs/heads/* this means that a new change request is created. If a user has push permissions to refs/heads/*, the change goes directly into the repository, without any review.
The same for Create Reference permission, which allows direct branch creation and is assigned to team leaders only by default.
The Submit privilege enables a user to hit the "Submit" button and thus really merge a change having enough positive votes into the Git repository. By default, team members (and leaders) are allowed to do this.
Create Reference and Push Annotaged Tag permissions on refs/tags/* mean that (by default only) team leaders can create lightweight and annotated tags.
Sorry, comments are closed for this post.