Download - Trunk Based Development Demystified
Trunk Based Development Demys4fied
Carlos Lopes ThoughtWorks
Guilherme Lacerda FACENSA/UniRiBer
TargetTrust/Surya SoCware Innova4on
agenda
the problem
impacts
solu2ons!
when to branch?
the problem
different streams, same codebase
branches!
Ronald Widha
merge hell
syntac2c conflict
class BlaBlaBla { <<<<<<< HEAD
public void bla(Bla oldBla, New newBla) { oldBla.bla(); newBla.newBla();
======= public void bla(Bla oldBla, Other otherBla) { oldBla.bla(); otherBla.otherBla();
>>>>>>> other commit }
}
seman2c conflict
class BlaBlaBla {
public void something(Bla bla) { <<<<<<< HEAD
bla = bla.plus(14); =======
bla = bla.minus(7); >>>>>>> change
//other stuff }
}
integra2on conflicts main.jsp: <%@include file="bla.jspf" %> master:
new-‐file.jsp: <%@include file="bla.jspf" %>
agivenbranch: bla.jspf -‐> ble.jspf main.jsp: <%@include file="ble.jspf" %>
the merge man/monkey
promiscuous integra2on
Mar6n Fowler
$$$$
Jon Wolter
regressions
Jon Wolter
Jon Wolter
“the bigger the apparent reason to branch, the more you shouldn’t branch.”
Jez Humble / David Farley
“don't separate differing concerns by using a VCS, use an abstrac6on instead.”
Stacy Curl
“feature branching is a poor man's modular architecture, instead of building systems with the ability to easy swap in and out
features at run6me/deploy6me they couple themselves to the source control providing this mechanism through manual merging”
Dan Bodart
all right, but how to solve this?
branch by source control?
there’s hope!
approaches
hide new func2onality
abstrac2on
Paul Hammant
big bang
Paul Hammant
itera2ve
small releasable changes
componen2za2on
enable flow across teams
KEEP IT ALWAYS RELEASABLE
KEEP IT ALWAYS RELEASABLE
CONTINUOUS INTEGRATION
CONTINUOUS INTEGRATION
program level product owner/champion
knows each project champion and how to reach people
Uncle Bob
but when to branch?
large change -‐ headaches! spikes -‐ if you throw them away new release -‐ hmm
Paul Hammant
www.codingbyexample.org
more info
thanks!