+ All Categories
Home > Technology > Xp conf-tbd

Xp conf-tbd

Date post: 20-Jan-2017
Category:
Upload: xp-conference-india
View: 344 times
Download: 0 times
Share this document with a friend
25
Copyright © 2015 SolutionsIQ Inc. All rights reserved. Branching for CD? Think again ! Devesh Chanchlani
Transcript
Page 1: Xp conf-tbd

Copyright © 2015 SolutionsIQ Inc. All rights reserved.

Branching for CD?Think again !Devesh Chanchlani

Terri Sharp
Background artwork, logo and address block are locked.Customize it: Unused text placeholders can be deleted if not needed. The title placeholder will hold up to three lines of text, sub title holds up to two lines of text. For readability, it would be better not to change the size of the text on the title slides.
Page 2: Xp conf-tbd

Self Introduction

• Passionate Programmer

• Technical Agile Coach with SolutionsIQ

• Coach teams to embrace, scale and sustain XP practices

• Belong to Pune

Terri Sharp
Background artwork, logo and address block are locked.Customize it: Unused text placeholders can be deleted if not needed. The title placeholder will hold up to three lines of text, sub title holds up to two lines of text. For readability, it would be better not to change the size of the text on the title slides.
Page 3: Xp conf-tbd

3

Traditional Branching Strategies

Terri Sharp
The gray background box is locked. A blank version (no gray box) is available if needed.Customize it: Move the quote marks to fit around your text. The text placeholder can be changed as needed, if you wish to use smaller text and add an image or graphic.
Page 4: Xp conf-tbd

4

Long Lived Feature Branches

Less risk of non-finished changes

» Merging with other Feature branches

» Merging with mainline changes

» Accommodating Refactorings and design improvements

Page 5: Xp conf-tbd

5

Changes being made to the mainline after being reviewed

» Merging issues» Refactoring becomes

challenging» Cannot have CI for each

branch» Sometimes changes are big &

individual commits not stable, that folks simply squash their changes into big commits.

Short Lived Feature Branches

D1D2

D3 D4

Page 6: Xp conf-tbd

6

Another Curious Case

Page 7: Xp conf-tbd

<Footer Content: Presentation Title, Partner Name, Other> 7

Page 8: Xp conf-tbd

8

“Feature branching is a poor man's modular architecture, instead of building systems 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 9: Xp conf-tbd

<Footer Content: Presentation Title, Partner Name, Other> 9

Trunk Based Development (TBD)

Page 10: Xp conf-tbd

10

What it means …

All developers commit to a single branch, called trunk, making frequent check-ins.

Branches are created only for Release purpose.

Bugs are always fixed on trunk and then merged with release branch.

Regular developers don’t commit to a release branch.

Release branches are never merged back to trunk.

Release branches are short-lived, frequently being replaced by other release branches.

Page 11: Xp conf-tbd

11

Trunk Based Development Strategies

Page 12: Xp conf-tbd

12

Imagine you are releasing into production every two weeks, but need to build a feature that's going to take three months to complete. How do you use Continuous Integration to keep everyone working on the mainline without revealing a half-implemented feature on your releases?

Page 13: Xp conf-tbd

13

Feature Toggles

Courtesy: Spotify Labs / Henrik Kniberg

Page 14: Xp conf-tbd

14

Feature Toggle implies …

A configuration file defines a bunch of toggles for various pending features.

These toggles are mostly applied at UIs, from where interaction with the features begins.

For features with no UI, the toggle will be in the app code. In such cases, techniques like polymorphic substitution and dependency injection

should be used to avoid crude conditional tests.

Feature toggles should be removed once the feature is complete.

Pipelines for different permutations of toggles for releases should be setup. If either of the build fails, it implies a bad commit.

Page 15: Xp conf-tbd

15

Feature Toggle types

1. Release – partial features, temporary

2. Business – certain class of users, permanent

3. Runtime – easier rollbacks, run tests with various configurations of features

4. Build – new feature codebase is not compiled

Page 16: Xp conf-tbd

16

Branch by Abstraction

Consumer

Component to be replaced

STEP 1

Consumer

Component to be replaced

Abstraction Layer

STEP 2

Consumer

Old Component

Abstraction Layer

New Component

STEP 3

Consumer

Old Component

Abstraction Layer

New Component

STEP 4

Page 17: Xp conf-tbd

17

TBD Success Stories

Page 18: Xp conf-tbd

18

Facebook's Trunk Based Development

Page 19: Xp conf-tbd

19

Google’s Scaled TBD

Page 20: Xp conf-tbd

20

Google’s Scaled TBD

Deals with enormous codebase which changes at enormous speeds.

Provides extensive tooling to the developers like Pre-commit validations

formal integration/merge/commit itself

have a “Distributed Builds” capability, which Supports “Caches” for leveraging results from previously built modules

Uses “Gerrit“ for code reviews on refs/for/master branch.

Has decided owners for all modules.

Third party dependencies can have only one existing version in the trunk.

Releases are made from branches cut from the trunk

Page 21: Xp conf-tbd

21

Google’s Scaled TBD

Master

Canary

Beta

Dev

Stable

Page 22: Xp conf-tbd

22

What it takes to Deliver Continuously

Page 23: Xp conf-tbd

23

References

Paul Hammant - http://paulhammant.com

Martin Fowler - http://martinfowler.com/bliki/FeatureToggle.html

Carlos Lopes - Multiple projects, different goals, one thing in common: the codebase!

Henrik Kniberg – Engineering at Spotify

Chuck Rossi – The Facebook Release Process

Page 24: Xp conf-tbd

24

Our Customers

Terri Sharp
Customer Logo Grid layout. These logos are locked on the slide master. Customize it: to use a different set of customer logos, use the Title Only or Blank layout and import the logos you need. Try to reduce them to all roughly the same size as shown here, and align the rows and columns for a neater appearance.
Page 25: Xp conf-tbd

25

Thank you!solutionsiq.com

Terri Sharp
Customize it: Thank you slide can also be used to provide additional contact information.

Recommended