+ All Categories
Home > Documents > Branch Management and Atomic Merge in a Continuous ...€¦ · Atomic Merge in a Continuous...

Branch Management and Atomic Merge in a Continuous ...€¦ · Atomic Merge in a Continuous...

Date post: 19-Apr-2018
Category:
Upload: duongnga
View: 229 times
Download: 8 times
Share this document with a friend
14
Branch Management and Atomic Merge in a Continuous Integration Environment Yi Zhang and Ray Chang EMC Corporation © 2011
Transcript
Page 1: Branch Management and Atomic Merge in a Continuous ...€¦ · Atomic Merge in a Continuous Integration Environment ... Q @ A . THE ISSUES – What ... • The defect model and Perforce

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 ...€¦ · Atomic Merge in a Continuous Integration Environment ... Q @ A . THE ISSUES – What ... • The defect model and Perforce

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 ...€¦ · Atomic Merge in a Continuous Integration Environment ... Q @ A . THE ISSUES – What ... • The defect model and Perforce

THE ISSUES – What’s wrong with this version tree?

Page 4: Branch Management and Atomic Merge in a Continuous ...€¦ · Atomic Merge in a Continuous Integration Environment ... Q @ A . THE ISSUES – What ... • The defect model and Perforce

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 ...€¦ · Atomic Merge in a Continuous Integration Environment ... Q @ A . THE ISSUES – What ... • The defect model and Perforce

THE SOLUTIONS – New Branch Model

•  The branch model and naming conventions

Page 6: Branch Management and Atomic Merge in a Continuous ...€¦ · Atomic Merge in a Continuous Integration Environment ... Q @ A . THE ISSUES – What ... • The defect model and Perforce

THE SOLUTIONS – New Defect Model

•  The defect model and Perforce directory structure

Page 7: Branch Management and Atomic Merge in a Continuous ...€¦ · Atomic Merge in a Continuous Integration Environment ... Q @ A . THE ISSUES – What ... • The defect model and Perforce

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 ...€¦ · Atomic Merge in a Continuous Integration Environment ... Q @ A . THE ISSUES – What ... • The defect model and Perforce

THE SOLUTIONS – The atomic merge tool

•  Logical flow chart of the merge tool

Page 9: Branch Management and Atomic Merge in a Continuous ...€¦ · Atomic Merge in a Continuous Integration Environment ... Q @ A . THE ISSUES – What ... • The defect model and Perforce

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 ...€¦ · Atomic Merge in a Continuous Integration Environment ... Q @ A . THE ISSUES – What ... • The defect model and Perforce

THE SOLUTIONS – Integration with defect-tracking

Page 11: Branch Management and Atomic Merge in a Continuous ...€¦ · Atomic Merge in a Continuous Integration Environment ... Q @ A . THE ISSUES – What ... • The defect model and Perforce

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 ...€¦ · Atomic Merge in a Continuous Integration Environment ... Q @ A . THE ISSUES – What ... • The defect model and Perforce

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 ...€¦ · Atomic Merge in a Continuous Integration Environment ... Q @ A . THE ISSUES – What ... • The defect model and Perforce

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 ...€¦ · Atomic Merge in a Continuous Integration Environment ... Q @ A . THE ISSUES – What ... • The defect model and Perforce

QUESTIONS @ ANSWERS


Recommended