branch management and atomic merge in a continuous integration environment
DESCRIPTION
Ensuring product quality and engineering productivity in an Agile environment with numerous concurrent branches can be challenging. In this presentation, Yi Zhang of EMC will share his team's branch management lessons and discuss the merge tool they've developed based on P4PERL. Hear how EMC leverages this tool to try and achieve great code quality and high engineering productivity at the same time.TRANSCRIPT
![Page 1: Branch Management and Atomic Merge in a Continuous Integration Environment](https://reader033.vdocument.in/reader033/viewer/2022052820/54668b72af795969458b4ef0/html5/thumbnails/1.jpg)
Branch Management and Atomic Merge in a Continuous Integration Environment Yi Zhang and Ray Chang EMC Corporation
© 2011
![Page 2: Branch Management and Atomic Merge in a Continuous Integration Environment](https://reader033.vdocument.in/reader033/viewer/2022052820/54668b72af795969458b4ef0/html5/thumbnails/2.jpg)
AGENDA
THE ISSUES • What’s Wrong? THE SOLUTIONS • The New Branch and Defect Model • The Atomic Merge Tool – Logical Flow • Integration with Defect-Tracking
CONCLUSIONS • Achievements • Remaining Issues
Q @ A
![Page 3: Branch Management and Atomic Merge in a Continuous Integration Environment](https://reader033.vdocument.in/reader033/viewer/2022052820/54668b72af795969458b4ef0/html5/thumbnails/3.jpg)
THE ISSUES – What’s wrong with this version tree?
![Page 4: Branch Management and Atomic Merge in a Continuous Integration Environment](https://reader033.vdocument.in/reader033/viewer/2022052820/54668b72af795969458b4ef0/html5/thumbnails/4.jpg)
THE ISSUES
• Anarchic Branching • Merge-phobia, unable to merge • Tremendous loss in productivity
Stubborn and egregiously harmful institutional habits formed over the years. Migrating to continuous integration exacerbated the issues.
![Page 5: Branch Management and Atomic Merge in a Continuous Integration Environment](https://reader033.vdocument.in/reader033/viewer/2022052820/54668b72af795969458b4ef0/html5/thumbnails/5.jpg)
THE SOLUTIONS – New Branch Model
• The branch model and naming conventions
![Page 6: Branch Management and Atomic Merge in a Continuous Integration Environment](https://reader033.vdocument.in/reader033/viewer/2022052820/54668b72af795969458b4ef0/html5/thumbnails/6.jpg)
THE SOLUTIONS – New Defect Model
• The defect model and Perforce directory structure
![Page 7: Branch Management and Atomic Merge in a Continuous Integration Environment](https://reader033.vdocument.in/reader033/viewer/2022052820/54668b72af795969458b4ef0/html5/thumbnails/7.jpg)
THE SOLUTIONS – The merge tool
• No significant change in merge habit • Improvement limited on the Defect-tracking side • Divergent branches still an issue
Based on “p4 integrate” of P4PERL, implemented an auto-merge tool to merge daily atomically among branches.
![Page 8: Branch Management and Atomic Merge in a Continuous Integration Environment](https://reader033.vdocument.in/reader033/viewer/2022052820/54668b72af795969458b4ef0/html5/thumbnails/8.jpg)
THE SOLUTIONS – The atomic merge tool
• Logical flow chart of the merge tool
![Page 9: Branch Management and Atomic Merge in a Continuous Integration Environment](https://reader033.vdocument.in/reader033/viewer/2022052820/54668b72af795969458b4ef0/html5/thumbnails/9.jpg)
THE SOLUTIONS – The atomic merge tool
A few assumptions: • Changelist restricted within a project branch • Merge occurred among the tips • Exclusions override the atomic rule
![Page 10: Branch Management and Atomic Merge in a Continuous Integration Environment](https://reader033.vdocument.in/reader033/viewer/2022052820/54668b72af795969458b4ef0/html5/thumbnails/10.jpg)
THE SOLUTIONS – Integration with defect-tracking
![Page 11: Branch Management and Atomic Merge in a Continuous Integration Environment](https://reader033.vdocument.in/reader033/viewer/2022052820/54668b72af795969458b4ef0/html5/thumbnails/11.jpg)
THE SOLUTIONS – The atomic merge tool
A few more points: • Web interface for ad hoc merge requests • Integration with the continuous integration tool • Running quality tool as a step of post-merge verification
![Page 12: Branch Management and Atomic Merge in a Continuous Integration Environment](https://reader033.vdocument.in/reader033/viewer/2022052820/54668b72af795969458b4ef0/html5/thumbnails/12.jpg)
CONCLUSIONS
Achievements: • A set of branching and merging policies are established and implemented • Atomic merge tool is successfully adopted by many teams and sites • Over 95% of automatic merge rate, significantly reduced manual work and enhanced productivity
![Page 13: Branch Management and Atomic Merge in a Continuous Integration Environment](https://reader033.vdocument.in/reader033/viewer/2022052820/54668b72af795969458b4ef0/html5/thumbnails/13.jpg)
CONCLUSIONS
Remaining issues: • How to prevent merge-up? • “p4 integrate” doesn’t always recognize duplicated check-ins. • Significant number of project teams not on board yet.
![Page 14: Branch Management and Atomic Merge in a Continuous Integration Environment](https://reader033.vdocument.in/reader033/viewer/2022052820/54668b72af795969458b4ef0/html5/thumbnails/14.jpg)
QUESTIONS @ ANSWERS