Why Trunk Based Development is the best branching model. Andrey Alexandrov



In State Of DevOps 2018 from DORA, we see High Performing Companies using Trunk Based Development. Let's figure out why exactly it, what its advantages and disadvantages this model has.





Hello! My name is Andrey. I am a DevOps consultant. I work at Express 42 and host the DevOps Deflope podcast. And today I will talk about Trunk Based Development.



This is a very complicated thing. I'm not sure if I can explain all the concepts and ideas behind it in 10 minutes.





? : , :





, .





- . , , . Trunk Based Development .





Trunk Based Development?



:



  • . , ( ), . , Trunk . , , , .
  • Feature Flags Branch By Abstraction. .
  • Continuous Code Review.
  • , , . – release ready , .




. ?



Feature Flags. .



Feature Flags? , , , . Feature Flags. , , . A/B , .





- ?



  • , .
  • A/B .
  • .


, . ? pull request. , . . , . . Trunk , Feature Flags .





. . . .



? , .



, , « » « ». , - -. , , .



Trunk ?



  1. pull request . , , . . pull request, .
  2. pull request. . . pull request. . pull requests , . Feature Flags, .
  3. . . , . . pull request’ .
  4. prod Feature Flags , .
  5. pull request’ .


, , . pull requests . . , Trunk .





?



  • . continuous integration , , . , . . , .
  • . , . , .
  • . , , - , , , . . pull request , . 5 , , .


, , Continuous Review.





  • ? , , pull request. - . , , . . . .
  • pull requests , . review . . . pull request , - , - , .
  • trunkbaseddevelopment.com , 10 pull request, . . 10 , . , .
  • pull request , , - . - .




  • review . , . , . . , 10 , .
  • . , review , . , , .
  • . pull request . , prode .




- . Trunk. , Git Flow GitHub Flow, , , Trunk Based Development . , .



  • -, , . , - , .
  • Feature Flags . , , . …, Ansible- . ., .
  • Branch By Abstraction , .


, , . SOLID‑. SOLID, , , . SOLID : « , -». , , .





, , , ?



:



  • . , , prode, .
  • . , - , . .
  • Continuous review, .
  • .




:







! , , , . . Git Flow . Git Flow , Trunk Based? ?



. Trunk Based Development . Branch By Abstraction, Short-Lived Branches. -, . - – . . , . .



, pull request . TeamLead, Branch. pull request, ? ?



-. , . , pull requests TeamLead – , , .



. . -?



. , . - , review, . . , . .



! ! ? , ?



. . SOLID, , . , , - . .



Feature Flags? overhead , ?



, , , prod .



overhead? , .



. . ? , ?



, , .



, . . .



, «if », . Also – . , . - overhead, if, , .



! . Trunk Based Development .



.



, . SVN. Trunk. pull request, Trunk. . . : « Git Flow, Trunk Based – - ». , Git. SVN, Git. Git. . Trunk Based Development . . , Trunk, , ? . . Short-Lived Branches , Branch By Abstraction, ?



– ?



, – - - .



. Branch By Abstraction, Commit By Abstraction ?



.



- , -.



Trunk - , .



. trunkbaseddevelopment.com, , , . , . , .



! ! (Branch By Abstraction feature branch). , . 4- ? - , .



. , , . -. , , Fowler, , , abstraction layer layer . Trunk Based Development, . , – . - . . . , , - .



Code Review. , junior- , Code Review 10 PR . , . ? juniors ?



?



junior , . . , , - pull request. , pull request 10 , . . 10 , , . ?



junior . 10 – . , . , Junior . , . .



? . . , 50 150 , ? , . - , - , . , , . , - Feature Flags, , ? . , .



. , , .



, .



. , . , . , . ? , . pull request , , . , . , , - -. , - pull request, , - .



I remembered that I wanted to do a survey. Raise your hand, who have heard about Trunk up to this point. Not bad, almost a third. And who uses it in their projects? 4 people.



We are in the same company.



Ah, you're in the same company, okay. Excellent.




All Articles