SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Downloaden Sie, um offline zu lesen
Gerrit Code Review
Web based code review and project management for Git based projects
Johannes Barop
gateprotect AG Germany
Agenda
Agenda
● Why Code Reviews?
● Why a Dedicated Tool for Reviews?
● Google’s Web Code Review Tools
● Introducing Gerrit Code Review
● Gerrit Workflow
● Typical Lifecycle of a Change
● Access Control
● Our Experience
Why Code Review?
Why Code Review?
● Detect more problems early and save hours of error finding
○ Four eyes see more than two
● Keep code quality high
○ Enforce coding standards
● Learn from mistakes without breaking stuff
○ Mentor other developers
Why Code Review?
● Prepare for more delegation
○ Building trust relationships
● Everyone is responsible
○ Collective code ownership
● Asynchronous and across locations
○ Alternative to pair programming
Why a Dedicated Tool for Reviews?
● How to review changesets?
○ In e-mails?
○ In the console?
○ In the changelog?
● When to review changes?
● How to collaborate?
● How to document the review process?
● How to integrate tools into the review?
Why a Dedicated Tool for Reviews?
● How to avoid breaking the continuous integration build before applying
changesets
○ … and blocking other developers :-(
● How to enforce coding standards (whitespaces, ...)
Why a Dedicated Tool for Reviews?
How to integrate tools into the review process?
Google’s Web Based Code Review Tools
● Created by Guido van Rossum (Author of Python)
● Named after Piet Mondrian
● Based on Perforce
● Proprietary
● Tied to Google infrastructure
Google’s Code Review Tools
Mondrian
● Also created by Guido van Rossum
● Named after Gerrit Rietveld
● Based on SVN
● Hosted on App Engine (https://codereview.appspot.com)
Google’s Code Review Tools
Rietveld
Introducing Gerrit Code Review
● Created by Shawn Pearce (Author of JGit)
● Started as set of patches against Rietveld
● Named after Gerrit Rietveld
● Intentionally created for Android Open Source Project
● Based on GIT
● Version 2: Completely rewritten in Java
○ JGit, GWT
Introducing Gerrit Code Review
● Users and Groups
● Project and branch security
● Git repository browsing
● Git repository replication
● Code collaboration and review
● Code validation through Jenkins Triggers
Introducing Gerrit Code Review
Main Features
● Gateprotect
● https://gerrit-review.googlesource.com
● https://review.source.android.com
● https://gwt-review.googlesource.com
● https://gerrit.chromium.org
● https://git.eclipse.org/r
● https://gerrit.libreoffice.org
● https://review.openstack.org
● https://review.typo3.org
● https://gerrit.wikimedia.org
● IBM, SAP, ...
Introducing Gerrit Code Review
Gerrit Workflow
Gerrit Workflow
● Automatic creating of topic-branches on commit
● Commits are drafts until they are merged in a real branch
● Jenkins validation
● Inline discussion on style and architecture
Gerrit Workflow
● Commits change during the improvement process
→ Commit hashes change
● Gerrit introduces a Change-Id to uniquely identify a change across all
drafts of it
● Assigned on commit
● Commit hook for auto-generating Change-Ids
○ scp -p -P 29418 review.example.com:hooks/commit-msg .git/hooks/
Change-IDs
Gerrit Workflow
Fixes IE's http status code mangling from 204 to 1223
XMLHTTPRequest object in IE will return a status code of 1223 and drops some
response headers if the server returns a HTTP/204.
This patch intercepts the original response in IE6-9 and returns 204 when the
code is 1223.
Associated issue:
http://code.google.com/p/google-web-toolkit/issues/detail?id=5031
Change-Id: I97b9094ef702cd852cc4d918183b394ffc853c32
Change-IDs
Gerrit Workflow
Democratic voting
● +2 Ok, Approved
● +1 Ok, someone else must approve
● 0 No score, just comments
● -1 I would not submit this
● -2 Blocks submitting
Gerrit Workflow
Democratic voting
● +1 and -1 are just an opinion
● +2 and -2 are allowing or blocking the change
● They do not accumulate
○ Two +1 do not equate to a +2.
Typical Lifecycle of a Change
Typical Lifecycle of a Change
master1
Typical Lifecycle of a Change
master1
1 local master
git clone
Typical Lifecycle of a Change
master1
1 local master2
git clone
git commit
Typical Lifecycle of a Change
master1
1 local master
2 immediate branch
2
git clone
git commit
git push for/master
Typical Lifecycle of a Change
master1
1 local master
2 immediate branch
Build failed!
Verified: -1
2
git clone
git commit
git push for/master
Typical Lifecycle of a Change
master1
1 local master
2 immediate branch
Build failed!
Verified: -1
2 2
git clone
git commit git commit --amend
git push for/master
Typical Lifecycle of a Change
master1
1 local master
2 immediate branch2
Build failed!
Verified: -1
2 2
git clone
git commit git commit --amend
git push for/master git push for/master
Typical Lifecycle of a Change
master1
1 local master
2 immediate branch2
Build failed!
Verified: -1
Build OK!
Verified: +1
2 2
git clone
git commit git commit --amend
git push for/master git push for/master
Typical Lifecycle of a Change
master1
1 local master
2 immediate branch2
Build failed!
Verified: -1
Build OK!
Verified: +1 Review: +2
2 2
git clone
git commit git commit --amend
git push for/master git push for/master
Typical Lifecycle of a Change
master1
1 local master
2 immediate branch2
Build failed!
Verified: -1
Build OK!
Verified: +1 Review: +2
2
2 2
git clone
git commit git commit --amend
git push for/master git push for/master
Access Control
● Define who can merge changes
● Define access rights to GIT operations
● Delegate project administration
● Assign code-review voting range rights
● Organize project rights hierarchically
● Define rights to reference names by regular expressions
○ refs/heads/experimental/*
○ refs/heads/sandbox/${username}/*
Access control
Our Experience
Our Experience
● Review all changes
● Reviews may take time
○ Authors have to wait for reviews
● Every developer should do reviews
● Connect continuous integration
Q&A
● Founded 2002
● Headquarter in Hamburg
○ Branch offices in 15 Countries
● 134 Employees
○ 50 in Research and Development
● Leading European manufacturer of network security solutions and ”
Made in Germany”
gateprotect - company profile
Small and Medium Companies
Modern Unified Threat Management Solution
The All-in-One-Solution for customers requiring complete protection and an easy-to-use solution...
Medium and Enterprise Companies
Next Generation Firewall Solution
The Enterprise Solution from gateprotect fulfilling the highest security needs…
gateprotect - product overview
Security Providers, System Retailers and Companies
Command Center – Managed Security Platform
Central management and monitoring for world-wide installed firewalls…
eGUI – The unique easy-to-use user interface
The world-wide unique graphical user interface allowing the complex network security configuration to
be more clear and understandable. Because transparency leads to security
gateprotect - product overview
<Thank you!>
Github: https://github.com/jbarop
Johannes Barop
gateprotect AG Germany
Google+: http://bit.ly/jbarop

Weitere ähnliche Inhalte

Was ist angesagt?

Git strategies for DevOps
Git strategies for DevOpsGit strategies for DevOps
Git strategies for DevOpsAhmad Iqbal Ali
 
Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...
Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...
Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...DevOps4Networks
 
Gerrit linuxtag2011
Gerrit linuxtag2011Gerrit linuxtag2011
Gerrit linuxtag2011thkoch
 
Gerrit jenkins-big data-continuous-delivery
Gerrit jenkins-big data-continuous-deliveryGerrit jenkins-big data-continuous-delivery
Gerrit jenkins-big data-continuous-deliveryLuca Milanesio
 
How Git and Gerrit make you more productive
How Git and Gerrit make you more productiveHow Git and Gerrit make you more productive
How Git and Gerrit make you more productiveKarsten Dambekalns
 
Gerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and DockerGerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and DockerLuca Milanesio
 
Gerrit Code Review with GitHub plugin
Gerrit Code Review with GitHub pluginGerrit Code Review with GitHub plugin
Gerrit Code Review with GitHub pluginLuca Milanesio
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hubJasleenSondhi
 
Gerrit Code Review v3.2 and v3.3
Gerrit Code Review v3.2 and v3.3Gerrit Code Review v3.2 and v3.3
Gerrit Code Review v3.2 and v3.3Luca Milanesio
 
2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_finalMythri P K
 
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepoGit in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepoGina Bustos
 
Speed up Continuous Delivery with BigData Analytics
Speed up Continuous Delivery with BigData AnalyticsSpeed up Continuous Delivery with BigData Analytics
Speed up Continuous Delivery with BigData AnalyticsLuca Milanesio
 
Zero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review UpgradeZero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review UpgradeLuca Milanesio
 
Git for Beginners
Git for BeginnersGit for Beginners
Git for BeginnersRick Umali
 
Essential git for developers
Essential git for developersEssential git for developers
Essential git for developersAdam Culp
 

Was ist angesagt? (20)

Git strategies for DevOps
Git strategies for DevOpsGit strategies for DevOps
Git strategies for DevOps
 
Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...
Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...
Test-Driven-Development for Networking: Making CI Work for You by Colin McNam...
 
Gerrit linuxtag2011
Gerrit linuxtag2011Gerrit linuxtag2011
Gerrit linuxtag2011
 
Gerrit jenkins-big data-continuous-delivery
Gerrit jenkins-big data-continuous-deliveryGerrit jenkins-big data-continuous-delivery
Gerrit jenkins-big data-continuous-delivery
 
How Git and Gerrit make you more productive
How Git and Gerrit make you more productiveHow Git and Gerrit make you more productive
How Git and Gerrit make you more productive
 
Gerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and DockerGerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and Docker
 
Gerrit Code Review with GitHub plugin
Gerrit Code Review with GitHub pluginGerrit Code Review with GitHub plugin
Gerrit Code Review with GitHub plugin
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
 
Gerrit Code Review v3.2 and v3.3
Gerrit Code Review v3.2 and v3.3Gerrit Code Review v3.2 and v3.3
Gerrit Code Review v3.2 and v3.3
 
2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final
 
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepoGit in the Enterprise: How to succeed at DevOps using Git and a monorepo
Git in the Enterprise: How to succeed at DevOps using Git and a monorepo
 
Speed up Continuous Delivery with BigData Analytics
Speed up Continuous Delivery with BigData AnalyticsSpeed up Continuous Delivery with BigData Analytics
Speed up Continuous Delivery with BigData Analytics
 
Git & Github
Git & GithubGit & Github
Git & Github
 
Zero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review UpgradeZero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review Upgrade
 
Introducing GitLab
Introducing GitLabIntroducing GitLab
Introducing GitLab
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Git for Beginners
Git for BeginnersGit for Beginners
Git for Beginners
 
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
 
Essential git for developers
Essential git for developersEssential git for developers
Essential git for developers
 
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
 

Andere mochten auch

RICH INTERNET APPLICATIONS - RIA Tools
RICH INTERNET APPLICATIONS - RIA ToolsRICH INTERNET APPLICATIONS - RIA Tools
RICH INTERNET APPLICATIONS - RIA ToolsMeghana Chandrashekar
 
Development with Git and Gerrit - Eclipse DemoCamp Stuttgart - 2010-11-23
Development with Git and Gerrit - Eclipse DemoCamp Stuttgart - 2010-11-23Development with Git and Gerrit - Eclipse DemoCamp Stuttgart - 2010-11-23
Development with Git and Gerrit - Eclipse DemoCamp Stuttgart - 2010-11-23msohn
 
Awesome Git Workflow for Agencies and Teams
Awesome Git Workflow for Agencies and TeamsAwesome Git Workflow for Agencies and Teams
Awesome Git Workflow for Agencies and TeamsChris Reynolds
 
A git workflow for Drupal Core development
A git workflow for Drupal Core developmentA git workflow for Drupal Core development
A git workflow for Drupal Core developmentCameron Tod
 
CakeDC Git Workflow extension
CakeDC Git Workflow extensionCakeDC Git Workflow extension
CakeDC Git Workflow extensionLubomír Štork
 
Anton Parkhomenko Boost your design workflow or git rebase for designers
Anton Parkhomenko Boost your design workflow or git rebase for designersAnton Parkhomenko Boost your design workflow or git rebase for designers
Anton Parkhomenko Boost your design workflow or git rebase for designersАліна Шепшелей
 
Effective Development With Eclipse Mylyn, Git, Gerrit and Hudson
Effective Development With Eclipse Mylyn, Git, Gerrit and HudsonEffective Development With Eclipse Mylyn, Git, Gerrit and Hudson
Effective Development With Eclipse Mylyn, Git, Gerrit and HudsonChris Aniszczyk
 
Sample Business Performance Review 2 2009 3
Sample Business Performance Review   2 2009 3Sample Business Performance Review   2 2009 3
Sample Business Performance Review 2 2009 3Pricewaterhousecoopers
 
Infrastructure Project Manager
Infrastructure Project ManagerInfrastructure Project Manager
Infrastructure Project Managergaryclough
 

Andere mochten auch (11)

gwt-pushstate
gwt-pushstategwt-pushstate
gwt-pushstate
 
RICH INTERNET APPLICATIONS - RIA Tools
RICH INTERNET APPLICATIONS - RIA ToolsRICH INTERNET APPLICATIONS - RIA Tools
RICH INTERNET APPLICATIONS - RIA Tools
 
Development with Git and Gerrit - Eclipse DemoCamp Stuttgart - 2010-11-23
Development with Git and Gerrit - Eclipse DemoCamp Stuttgart - 2010-11-23Development with Git and Gerrit - Eclipse DemoCamp Stuttgart - 2010-11-23
Development with Git and Gerrit - Eclipse DemoCamp Stuttgart - 2010-11-23
 
Awesome Git Workflow for Agencies and Teams
Awesome Git Workflow for Agencies and TeamsAwesome Git Workflow for Agencies and Teams
Awesome Git Workflow for Agencies and Teams
 
A git workflow for Drupal Core development
A git workflow for Drupal Core developmentA git workflow for Drupal Core development
A git workflow for Drupal Core development
 
CakeDC Git Workflow extension
CakeDC Git Workflow extensionCakeDC Git Workflow extension
CakeDC Git Workflow extension
 
Anton Parkhomenko Boost your design workflow or git rebase for designers
Anton Parkhomenko Boost your design workflow or git rebase for designersAnton Parkhomenko Boost your design workflow or git rebase for designers
Anton Parkhomenko Boost your design workflow or git rebase for designers
 
Effective Development With Eclipse Mylyn, Git, Gerrit and Hudson
Effective Development With Eclipse Mylyn, Git, Gerrit and HudsonEffective Development With Eclipse Mylyn, Git, Gerrit and Hudson
Effective Development With Eclipse Mylyn, Git, Gerrit and Hudson
 
Ultimate Git Workflow - Seoul 2015
Ultimate Git Workflow - Seoul 2015Ultimate Git Workflow - Seoul 2015
Ultimate Git Workflow - Seoul 2015
 
Sample Business Performance Review 2 2009 3
Sample Business Performance Review   2 2009 3Sample Business Performance Review   2 2009 3
Sample Business Performance Review 2 2009 3
 
Infrastructure Project Manager
Infrastructure Project ManagerInfrastructure Project Manager
Infrastructure Project Manager
 

Ähnlich wie Gerrit Code Review

Overview of Gitlab usage
Overview of Gitlab usageOverview of Gitlab usage
Overview of Gitlab usageOluDouglas
 
Code review and automated testing for Puppet code
Code review and automated testing for Puppet codeCode review and automated testing for Puppet code
Code review and automated testing for Puppet codewzzrd
 
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...Gibran Badrulzaman
 
Git for work groups ironhack talk
Git for work groups ironhack talkGit for work groups ironhack talk
Git for work groups ironhack talkTiago Ameller
 
Intro to Git for Project Managers
Intro to Git for Project ManagersIntro to Git for Project Managers
Intro to Git for Project ManagersOyeLabs
 
Git/Gerrit with TeamForge
Git/Gerrit with TeamForgeGit/Gerrit with TeamForge
Git/Gerrit with TeamForgeCollabNet
 
EGit and Gerrit Code Review - Eclipse DemoCamp Bonn - 2010-11-16
EGit and Gerrit Code Review - Eclipse DemoCamp Bonn - 2010-11-16EGit and Gerrit Code Review - Eclipse DemoCamp Bonn - 2010-11-16
EGit and Gerrit Code Review - Eclipse DemoCamp Bonn - 2010-11-16msohn
 
Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.WordCamp Harare
 
Big feature - small sprint
Big feature - small sprint Big feature - small sprint
Big feature - small sprint Igor Goldshmidt
 
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)GDSCNiT
 
How to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineHow to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineElasTest Project
 
Learning Git and GitHub - BIT GDSC.pdf
Learning Git and GitHub - BIT GDSC.pdfLearning Git and GitHub - BIT GDSC.pdf
Learning Git and GitHub - BIT GDSC.pdfJayprakash677449
 
Git introduction for Beginners
Git introduction for BeginnersGit introduction for Beginners
Git introduction for BeginnersMortezaTaghaddomi
 
O'Leary - Using GitHub for Enterprise and Open Source Documentation
O'Leary - Using GitHub for Enterprise and Open Source DocumentationO'Leary - Using GitHub for Enterprise and Open Source Documentation
O'Leary - Using GitHub for Enterprise and Open Source DocumentationLavaCon
 
You're doing it wrong! Git it right!
You're doing it wrong! Git it right!You're doing it wrong! Git it right!
You're doing it wrong! Git it right!Cory Webb
 
BLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersBLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersMartin Jinoch
 

Ähnlich wie Gerrit Code Review (20)

Overview of Gitlab usage
Overview of Gitlab usageOverview of Gitlab usage
Overview of Gitlab usage
 
The-Git-Tutorial.ppt.pptx
The-Git-Tutorial.ppt.pptxThe-Git-Tutorial.ppt.pptx
The-Git-Tutorial.ppt.pptx
 
Code review and automated testing for Puppet code
Code review and automated testing for Puppet codeCode review and automated testing for Puppet code
Code review and automated testing for Puppet code
 
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...
 
Git for work groups ironhack talk
Git for work groups ironhack talkGit for work groups ironhack talk
Git for work groups ironhack talk
 
Intro to Git for Project Managers
Intro to Git for Project ManagersIntro to Git for Project Managers
Intro to Git for Project Managers
 
Introduction to git & github
Introduction to git & githubIntroduction to git & github
Introduction to git & github
 
Git/Gerrit with TeamForge
Git/Gerrit with TeamForgeGit/Gerrit with TeamForge
Git/Gerrit with TeamForge
 
EGit and Gerrit Code Review - Eclipse DemoCamp Bonn - 2010-11-16
EGit and Gerrit Code Review - Eclipse DemoCamp Bonn - 2010-11-16EGit and Gerrit Code Review - Eclipse DemoCamp Bonn - 2010-11-16
EGit and Gerrit Code Review - Eclipse DemoCamp Bonn - 2010-11-16
 
Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.
 
Big feature - small sprint
Big feature - small sprint Big feature - small sprint
Big feature - small sprint
 
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
 
Open Source_Git.pptx
Open Source_Git.pptxOpen Source_Git.pptx
Open Source_Git.pptx
 
How to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineHow to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipeline
 
Learning Git and GitHub - BIT GDSC.pdf
Learning Git and GitHub - BIT GDSC.pdfLearning Git and GitHub - BIT GDSC.pdf
Learning Git and GitHub - BIT GDSC.pdf
 
Debugging 2013- Lars pedersen
Debugging 2013- Lars pedersenDebugging 2013- Lars pedersen
Debugging 2013- Lars pedersen
 
Git introduction for Beginners
Git introduction for BeginnersGit introduction for Beginners
Git introduction for Beginners
 
O'Leary - Using GitHub for Enterprise and Open Source Documentation
O'Leary - Using GitHub for Enterprise and Open Source DocumentationO'Leary - Using GitHub for Enterprise and Open Source Documentation
O'Leary - Using GitHub for Enterprise and Open Source Documentation
 
You're doing it wrong! Git it right!
You're doing it wrong! Git it right!You're doing it wrong! Git it right!
You're doing it wrong! Git it right!
 
BLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersBLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes Developers
 

Kürzlich hochgeladen

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Kürzlich hochgeladen (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Gerrit Code Review

  • 1. Gerrit Code Review Web based code review and project management for Git based projects Johannes Barop gateprotect AG Germany
  • 3. Agenda ● Why Code Reviews? ● Why a Dedicated Tool for Reviews? ● Google’s Web Code Review Tools ● Introducing Gerrit Code Review ● Gerrit Workflow ● Typical Lifecycle of a Change ● Access Control ● Our Experience
  • 5. Why Code Review? ● Detect more problems early and save hours of error finding ○ Four eyes see more than two ● Keep code quality high ○ Enforce coding standards ● Learn from mistakes without breaking stuff ○ Mentor other developers
  • 6. Why Code Review? ● Prepare for more delegation ○ Building trust relationships ● Everyone is responsible ○ Collective code ownership ● Asynchronous and across locations ○ Alternative to pair programming
  • 7. Why a Dedicated Tool for Reviews?
  • 8. ● How to review changesets? ○ In e-mails? ○ In the console? ○ In the changelog? ● When to review changes? ● How to collaborate? ● How to document the review process? ● How to integrate tools into the review? Why a Dedicated Tool for Reviews?
  • 9. ● How to avoid breaking the continuous integration build before applying changesets ○ … and blocking other developers :-( ● How to enforce coding standards (whitespaces, ...) Why a Dedicated Tool for Reviews? How to integrate tools into the review process?
  • 10. Google’s Web Based Code Review Tools
  • 11. ● Created by Guido van Rossum (Author of Python) ● Named after Piet Mondrian ● Based on Perforce ● Proprietary ● Tied to Google infrastructure Google’s Code Review Tools Mondrian
  • 12. ● Also created by Guido van Rossum ● Named after Gerrit Rietveld ● Based on SVN ● Hosted on App Engine (https://codereview.appspot.com) Google’s Code Review Tools Rietveld
  • 14. ● Created by Shawn Pearce (Author of JGit) ● Started as set of patches against Rietveld ● Named after Gerrit Rietveld ● Intentionally created for Android Open Source Project ● Based on GIT ● Version 2: Completely rewritten in Java ○ JGit, GWT Introducing Gerrit Code Review
  • 15. ● Users and Groups ● Project and branch security ● Git repository browsing ● Git repository replication ● Code collaboration and review ● Code validation through Jenkins Triggers Introducing Gerrit Code Review Main Features
  • 16. ● Gateprotect ● https://gerrit-review.googlesource.com ● https://review.source.android.com ● https://gwt-review.googlesource.com ● https://gerrit.chromium.org ● https://git.eclipse.org/r ● https://gerrit.libreoffice.org ● https://review.openstack.org ● https://review.typo3.org ● https://gerrit.wikimedia.org ● IBM, SAP, ... Introducing Gerrit Code Review
  • 18. Gerrit Workflow ● Automatic creating of topic-branches on commit ● Commits are drafts until they are merged in a real branch ● Jenkins validation ● Inline discussion on style and architecture
  • 19. Gerrit Workflow ● Commits change during the improvement process → Commit hashes change ● Gerrit introduces a Change-Id to uniquely identify a change across all drafts of it ● Assigned on commit ● Commit hook for auto-generating Change-Ids ○ scp -p -P 29418 review.example.com:hooks/commit-msg .git/hooks/ Change-IDs
  • 20. Gerrit Workflow Fixes IE's http status code mangling from 204 to 1223 XMLHTTPRequest object in IE will return a status code of 1223 and drops some response headers if the server returns a HTTP/204. This patch intercepts the original response in IE6-9 and returns 204 when the code is 1223. Associated issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=5031 Change-Id: I97b9094ef702cd852cc4d918183b394ffc853c32 Change-IDs
  • 21. Gerrit Workflow Democratic voting ● +2 Ok, Approved ● +1 Ok, someone else must approve ● 0 No score, just comments ● -1 I would not submit this ● -2 Blocks submitting
  • 22. Gerrit Workflow Democratic voting ● +1 and -1 are just an opinion ● +2 and -2 are allowing or blocking the change ● They do not accumulate ○ Two +1 do not equate to a +2.
  • 24. Typical Lifecycle of a Change master1
  • 25. Typical Lifecycle of a Change master1 1 local master git clone
  • 26. Typical Lifecycle of a Change master1 1 local master2 git clone git commit
  • 27. Typical Lifecycle of a Change master1 1 local master 2 immediate branch 2 git clone git commit git push for/master
  • 28. Typical Lifecycle of a Change master1 1 local master 2 immediate branch Build failed! Verified: -1 2 git clone git commit git push for/master
  • 29. Typical Lifecycle of a Change master1 1 local master 2 immediate branch Build failed! Verified: -1 2 2 git clone git commit git commit --amend git push for/master
  • 30. Typical Lifecycle of a Change master1 1 local master 2 immediate branch2 Build failed! Verified: -1 2 2 git clone git commit git commit --amend git push for/master git push for/master
  • 31. Typical Lifecycle of a Change master1 1 local master 2 immediate branch2 Build failed! Verified: -1 Build OK! Verified: +1 2 2 git clone git commit git commit --amend git push for/master git push for/master
  • 32. Typical Lifecycle of a Change master1 1 local master 2 immediate branch2 Build failed! Verified: -1 Build OK! Verified: +1 Review: +2 2 2 git clone git commit git commit --amend git push for/master git push for/master
  • 33. Typical Lifecycle of a Change master1 1 local master 2 immediate branch2 Build failed! Verified: -1 Build OK! Verified: +1 Review: +2 2 2 2 git clone git commit git commit --amend git push for/master git push for/master
  • 35. ● Define who can merge changes ● Define access rights to GIT operations ● Delegate project administration ● Assign code-review voting range rights ● Organize project rights hierarchically ● Define rights to reference names by regular expressions ○ refs/heads/experimental/* ○ refs/heads/sandbox/${username}/* Access control
  • 37. Our Experience ● Review all changes ● Reviews may take time ○ Authors have to wait for reviews ● Every developer should do reviews ● Connect continuous integration
  • 38. Q&A
  • 39. ● Founded 2002 ● Headquarter in Hamburg ○ Branch offices in 15 Countries ● 134 Employees ○ 50 in Research and Development ● Leading European manufacturer of network security solutions and ” Made in Germany” gateprotect - company profile
  • 40. Small and Medium Companies Modern Unified Threat Management Solution The All-in-One-Solution for customers requiring complete protection and an easy-to-use solution... Medium and Enterprise Companies Next Generation Firewall Solution The Enterprise Solution from gateprotect fulfilling the highest security needs… gateprotect - product overview
  • 41. Security Providers, System Retailers and Companies Command Center – Managed Security Platform Central management and monitoring for world-wide installed firewalls… eGUI – The unique easy-to-use user interface The world-wide unique graphical user interface allowing the complex network security configuration to be more clear and understandable. Because transparency leads to security gateprotect - product overview
  • 42. <Thank you!> Github: https://github.com/jbarop Johannes Barop gateprotect AG Germany Google+: http://bit.ly/jbarop