Reflections on SCM
Diego Pacheco
@diego_pacheco
❏ Cat's Father
❏ Head of Software Architecture
❏ Agile Coach
❏ SOA/Microservices Expert
❏ DevOps Practitioner
❏ Speaker
❏ Author
diegopacheco
http://diego-pacheco.blogspot.com.br/
About me...
https://diegopacheco.github.io/
Every company works with Branches
Git Made branches much less painful...
But do we think about the implications?
❏ How much they affect CI/CD ?
❏ How much they affect Refactoring?
❏ How much they create bottlenecks?
❏ How much they hide architectural complexity?
❏ They optimized for Local, remote, colarotation or what?
Back do Lean/Agile/DevOps Principles
❏ Increase Feedback into the system
❏ Reduce Feedback cycles
❏ Reduce Batch size (lower delta, lower risk)
❏ Increase deployment frequence
❏ Experiment often
… it’s branches aligned with that?
Branch by Abstraction
❏ Long lived Branches
❏ Easily can live for 2 weeks (1 Sprint) or even much longer
❏ Benefits: Easily to Pause or Cancel
❏ How to:
❏ Introduce Abstraction, Wrote a second implementation
❏ Enable to all, remove old, on/off switch
Branch per Release
❏ Team pushes to prod or regular schedule (Sprint, Monthly)
❏ Also will need to push bug-fix releases in between.
❏ Stable place since devs are still committing on Trunk
❏ CI/CD Teams don't use this technique.
Release form Trunk
❏ Teams with high release cadence release from Trunk.
❏ No Slow down in releases
❏ Branches can be created retroactively
CI/CD
❏ XP technique
❏ CI by definition is single integration Source.
Trunk Based Development
❏ How CI/CD High Performance DevOps teams Work!
❏ Incompatible with GitFlow
❏ Works best for fast interactions/releases and SR engineers.
GitFlow
GitFlow: Commit Races
❏ Lots of changes
❏ First to Commit win
❏ Also known as PR Races
❏ It happens !!!
Issues with Branches
❏ Don’ t encourage Refactoring (Harder Merges)
❏ Shallow Review: Fast LGTM
❏ Batch size Problem (Anti-Lean)
❏ No Real CI happening
❏ Core Team Vs External Contributors
Other alternatives to branches...
The Issue with Release Trains / Calendars
Github Flow
Git OPS
PRs, PP/Mob and Code Review
❏ PR can create “interruptions”.
❏ Branches are good for individuals and bad for teams.
❏ Pair Programing is Code Review (no need to submit a PR)
❏ PP/Mob help to share knowledge
❏ PP/Mob is much faster Feedback
Branches and Architecture
❏ Good Modular Architecture
dont require branches.
❏ Mobile Might require
branches by nature.
❏ Isolation is the ultimate
branch blast radius
reducer.
❏ Code is Dynamic, Branches
are static.
Wrapping Thoughts
❏ Branches and PRs are cheap and the norm today.
❏ Most of companies see CI/CD as tools and not as principles.
❏ It's common to see people that don't want increase deployment frequency.
❏ Good Architecture require less or no branching.
❏ High Frequency releases and gitflow don't match.
❏ Lower Delta, Lower Risk, Release Often, Get more feedback.
Reflections on SCM
Diego Pacheco

Reflections on SCM

  • 1.
  • 2.
    @diego_pacheco ❏ Cat's Father ❏Head of Software Architecture ❏ Agile Coach ❏ SOA/Microservices Expert ❏ DevOps Practitioner ❏ Speaker ❏ Author diegopacheco http://diego-pacheco.blogspot.com.br/ About me... https://diegopacheco.github.io/
  • 3.
    Every company workswith Branches
  • 4.
    Git Made branchesmuch less painful...
  • 5.
    But do wethink about the implications? ❏ How much they affect CI/CD ? ❏ How much they affect Refactoring? ❏ How much they create bottlenecks? ❏ How much they hide architectural complexity? ❏ They optimized for Local, remote, colarotation or what?
  • 6.
    Back do Lean/Agile/DevOpsPrinciples ❏ Increase Feedback into the system ❏ Reduce Feedback cycles ❏ Reduce Batch size (lower delta, lower risk) ❏ Increase deployment frequence ❏ Experiment often … it’s branches aligned with that?
  • 7.
    Branch by Abstraction ❏Long lived Branches ❏ Easily can live for 2 weeks (1 Sprint) or even much longer ❏ Benefits: Easily to Pause or Cancel ❏ How to: ❏ Introduce Abstraction, Wrote a second implementation ❏ Enable to all, remove old, on/off switch
  • 8.
    Branch per Release ❏Team pushes to prod or regular schedule (Sprint, Monthly) ❏ Also will need to push bug-fix releases in between. ❏ Stable place since devs are still committing on Trunk ❏ CI/CD Teams don't use this technique.
  • 9.
    Release form Trunk ❏Teams with high release cadence release from Trunk. ❏ No Slow down in releases ❏ Branches can be created retroactively
  • 10.
    CI/CD ❏ XP technique ❏CI by definition is single integration Source.
  • 11.
    Trunk Based Development ❏How CI/CD High Performance DevOps teams Work! ❏ Incompatible with GitFlow ❏ Works best for fast interactions/releases and SR engineers.
  • 12.
  • 13.
    GitFlow: Commit Races ❏Lots of changes ❏ First to Commit win ❏ Also known as PR Races ❏ It happens !!!
  • 14.
    Issues with Branches ❏Don’ t encourage Refactoring (Harder Merges) ❏ Shallow Review: Fast LGTM ❏ Batch size Problem (Anti-Lean) ❏ No Real CI happening ❏ Core Team Vs External Contributors
  • 15.
  • 16.
    The Issue withRelease Trains / Calendars
  • 17.
  • 18.
  • 19.
    PRs, PP/Mob andCode Review ❏ PR can create “interruptions”. ❏ Branches are good for individuals and bad for teams. ❏ Pair Programing is Code Review (no need to submit a PR) ❏ PP/Mob help to share knowledge ❏ PP/Mob is much faster Feedback
  • 20.
    Branches and Architecture ❏Good Modular Architecture dont require branches. ❏ Mobile Might require branches by nature. ❏ Isolation is the ultimate branch blast radius reducer. ❏ Code is Dynamic, Branches are static.
  • 21.
    Wrapping Thoughts ❏ Branchesand PRs are cheap and the norm today. ❏ Most of companies see CI/CD as tools and not as principles. ❏ It's common to see people that don't want increase deployment frequency. ❏ Good Architecture require less or no branching. ❏ High Frequency releases and gitflow don't match. ❏ Lower Delta, Lower Risk, Release Often, Get more feedback.
  • 22.