Trunk Based Development Explored

49
Trunk Based Development Trunk Based Development Explored Explored Carlos Lopes ThoughtWorks Guilherme Lacerda FACENSA/UniRitter TargetTrust/Surya Software Innovation

description

Palestra realiz

Transcript of Trunk Based Development Explored

Page 1: Trunk Based Development Explored

Trunk Based Development Trunk Based Development

ExploredExplored

Carlos Lopes

ThoughtWorks

Guilherme Lacerda

FACENSA/UniRitter

TargetTrust/Surya Software Innovation

Page 2: Trunk Based Development Explored

agenda

the problem

impacts

solutions!

when to branch?

Page 3: Trunk Based Development Explored

the problemthe problem

Page 4: Trunk Based Development Explored

different streams,

same codebase

Page 5: Trunk Based Development Explored
Page 6: Trunk Based Development Explored

branches!branches!

Page 7: Trunk Based Development Explored

Ronald Widha

Page 8: Trunk Based Development Explored
Page 9: Trunk Based Development Explored
Page 10: Trunk Based Development Explored

merge hell

Page 11: Trunk Based Development Explored

syntactic conflict

class BlaBlaBla {

<<<<<<< HEAD<<<<<<< HEADpublic void bla(Bla oldBla, New newBla) {

oldBla.bla();newBla.newBla();

=======public void bla(Bla oldBla, Other otherBla) {

oldBla.bla();otherBla.otherBla();

>>>>>>> other commit}

}

Page 12: Trunk Based Development Explored

semantic conflict

class BlaBlaBla {

public void something(Bla bla) {public void something(Bla bla) {<<<<<<< HEAD

bla = bla.plus(14);=======

bla = bla.minus(7);>>>>>>> change

//other stuff}

}

Page 13: Trunk Based Development Explored

integration conflicts

main.jsp: <%@include file="bla.jspf" %>

master: agivenbranch:master:

new-file.jsp:<%@include file="bla.jspf" %>

agivenbranch:

bla.jspf -> ble.jspf

main.jsp:<%@include file="ble.jspf" %>

Page 14: Trunk Based Development Explored

the merge man/monkey

Page 15: Trunk Based Development Explored

promiscuous integration

Martin Fowler

Page 16: Trunk Based Development Explored

$$$$$$$$

Page 17: Trunk Based Development Explored

Jon Wolter

Page 18: Trunk Based Development Explored

regressionsregressions

Page 19: Trunk Based Development Explored

Jon Wolter

Page 20: Trunk Based Development Explored

Jon Wolter

Page 21: Trunk Based Development Explored

“the bigger the apparent

reason to branch, the more reason to branch, the more

you shouldn’t branch.”

Jez Humble / David Farley

Page 22: Trunk Based Development Explored

“don't separate differing

concerns by using a VCS, use concerns by using a VCS, use

an abstraction instead.”

Stacy Curl

Page 23: Trunk Based Development Explored

“feature branching is a poor man's modular

architecture, instead of building systems

with the ability to easy swap in and out with the ability to easy swap in and out

features at runtime/deploytime they couple

themselves to the source control providing

this mechanism through manual merging”

Dan Bodart

Page 24: Trunk Based Development Explored

all right, but how to all right, but how to

solve this?solve this?

Page 25: Trunk Based Development Explored

branch by

source control?source control?

Page 26: Trunk Based Development Explored
Page 27: Trunk Based Development Explored

there’s hope!

Page 28: Trunk Based Development Explored

approaches

Page 29: Trunk Based Development Explored

hide new functionality

Page 30: Trunk Based Development Explored

abstractionabstraction

Page 31: Trunk Based Development Explored

big bang

Paul Hammant

Page 32: Trunk Based Development Explored

iterative

Paul Hammant

Page 33: Trunk Based Development Explored

small releasable changes

Page 34: Trunk Based Development Explored

componentization

Page 35: Trunk Based Development Explored

enable flow

across teamsacross teams

Page 36: Trunk Based Development Explored

KEEP IT ALWAYS RELEASABLE

Page 37: Trunk Based Development Explored

KEEP IT ALWAYS RELEASABLE

Page 38: Trunk Based Development Explored

CONTINUOUS INTEGRATION

Page 39: Trunk Based Development Explored

CONTINUOUS INTEGRATION

Page 40: Trunk Based Development Explored

program level program level

product owner/champion product owner/champion

knows each project champion and knows each project champion and

how to reach peoplehow to reach people

Page 41: Trunk Based Development Explored

Uncle Bob

Page 42: Trunk Based Development Explored

when to branch?

large change

spikes

new release

Page 43: Trunk Based Development Explored

when to branch?

large change

spikes

new release

Page 44: Trunk Based Development Explored

when to branch?

large change

spikes

new release

Page 45: Trunk Based Development Explored

Paul Hammant

Page 46: Trunk Based Development Explored

branching vs. freezingbranching vs. freezingbranching vs. freezingbranching vs. freezing

Page 47: Trunk Based Development Explored

www.codingbyexample.org

more info

www.codingbyexample.org

Page 48: Trunk Based Development Explored

thanks!

Page 49: Trunk Based Development Explored