SlideShare uma empresa Scribd logo
1 de 28
Anand Agrawal
Feature branches
&
Continuous Integration
Feature Braches
Trunk
Developer A
Developer B
 Pros
 Code for new feature could not make to
production
 No fear to check-in in branch
 Cons
 Merge hell
 Fear of refactoring
 Difficult to share code across branches
Continuous Integration
 Pros
 Avoid big merges
 Each check-in is production ready
 Continuously Integrate thorough out the
progress path of the feature
 Cons
 Incomplete feature may go to production
 Fear to commit code
Then how to do Continuous
Integration?
Feature Toggles
What are toggles?
It’s a simple if statement
Feature toggle is a if
statement that hides certain
execution path
Types of Feature toggle
 Release toggles
 Business toggles
Release Toggles
 To hide incomplete feature
 Short lived
 Removed as soon as feature is ready
 Have pre-decided values across
environments (except dev)
Business Toggles
 To enable A / B testing
 Release feature to certain groups of
people to get early feedback
 Could be enabled or disabled on the fly
Testing the Toggles
 Unit Test
 Test for both conditions i.e. toggle on and off
 Integration Test
 Test with toggle states that are going live
 Test with toggle on
 With business toggles be smart about what
you want to test than try and test all
combinations
Tips and tricks to implement
Feature Toggle
In case of building new API end
point that is not public facing
No feature toggle needed
In case of creating new
model or table
No feature toggle needed
In case of adding a new column
in database and exposing it
through service
No feature toggle needed
May feature toggle validations
or provide default value
In case of new endpoint that is
public facing
Just feature toggle the url
In case of UI component
embedded in existing page
Feature toggle the view
element
In case of logic change like
change the way payment is
processed
Feature toggle by abstraction
Things to keep in mind
 Don’t try to toggle each and every line of
code. Use only where its needed.
 Keep the number of toggles under
control
 Try to create mutually exclusive toggles
 Clean up release toggles and dead code
Ways to implement toggles
 Config file
 Toggle manager for Admin to manage
 Cookie store
 … or whatever that makes sense
They are riding on the same
boat
Feature Toggle is second best
solution. The best solution is to
find a way to gradually
integrate, without Feature
Branches or Feature Toggles.
Martin Fowler
No free lunch
 Good test suite (unit and acceptance)
 Fix or Revert the breaking change
immediately
 Break down features into smaller stories
 Break down stories into smaller tech
tasks
 Think of how to take your code to
production everyday than creating
blockers
References
 http://martinfowler.com/bliki/FeatureToggle.html
 http://www.infoq.com/presentations/Feature-Bits
 http://blog.pluralsight.com/favor-feature-toggles-
over-feature-branches
 http://paulhammant.com/blog/branch_by_abstracti
on.html
 http://labs.spotify.com/2014/03/27/spotify-
engineering-culture-part-1/
Questions ?

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Git Branching Model
Git Branching ModelGit Branching Model
Git Branching Model
 
Git and GitFlow branching model
Git and GitFlow branching modelGit and GitFlow branching model
Git and GitFlow branching model
 
Git flow
Git flowGit flow
Git flow
 
Agile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven DesignAgile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven Design
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
 
Case Study: Migration to GitLab (from Bitbucket) at AppsFlyer
Case Study: Migration to GitLab (from Bitbucket) at AppsFlyerCase Study: Migration to GitLab (from Bitbucket) at AppsFlyer
Case Study: Migration to GitLab (from Bitbucket) at AppsFlyer
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Git branching strategies
Git branching strategiesGit branching strategies
Git branching strategies
 
ROI & Business Value of CI, CD, DevOps, DevSecOps, & Microservices
ROI & Business Value of CI, CD, DevOps, DevSecOps, & MicroservicesROI & Business Value of CI, CD, DevOps, DevSecOps, & Microservices
ROI & Business Value of CI, CD, DevOps, DevSecOps, & Microservices
 
Microservices, Kubernetes and Istio - A Great Fit!
Microservices, Kubernetes and Istio - A Great Fit!Microservices, Kubernetes and Istio - A Great Fit!
Microservices, Kubernetes and Istio - A Great Fit!
 
CQRS in 4 steps
CQRS in 4 stepsCQRS in 4 steps
CQRS in 4 steps
 
DevOps - A Gentle Introduction
DevOps - A Gentle IntroductionDevOps - A Gentle Introduction
DevOps - A Gentle Introduction
 
Deploy 22 microservices from scratch in 30 mins with GitOps
Deploy 22 microservices from scratch in 30 mins with GitOpsDeploy 22 microservices from scratch in 30 mins with GitOps
Deploy 22 microservices from scratch in 30 mins with GitOps
 
Git Branching for Agile Teams
Git Branching for Agile Teams Git Branching for Agile Teams
Git Branching for Agile Teams
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
CICD with Jenkins
 
Come Fly With Me: Database Migration Patterns with Flyway
Come Fly With Me: Database Migration Patterns with FlywayCome Fly With Me: Database Migration Patterns with Flyway
Come Fly With Me: Database Migration Patterns with Flyway
 
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDKubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
 
CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton CI-CD Jenkins, GitHub Actions, Tekton
CI-CD Jenkins, GitHub Actions, Tekton
 
Azure DevOps for Developers
Azure DevOps for DevelopersAzure DevOps for Developers
Azure DevOps for Developers
 

Destaque

Why we used Feature Branching
Why we used Feature BranchingWhy we used Feature Branching
Why we used Feature Branching
Alan Parkinson
 
Chrome release cycle
Chrome release cycleChrome release cycle
Chrome release cycle
Jolicloud
 

Destaque (20)

Waltzing with Branches [ACCU]
Waltzing with Branches [ACCU]Waltzing with Branches [ACCU]
Waltzing with Branches [ACCU]
 
Feature Toggles On Steroids
Feature Toggles On SteroidsFeature Toggles On Steroids
Feature Toggles On Steroids
 
Feature Toggle XP Conference 2016 Kalpana Gulati
Feature Toggle  XP Conference 2016 Kalpana GulatiFeature Toggle  XP Conference 2016 Kalpana Gulati
Feature Toggle XP Conference 2016 Kalpana Gulati
 
Why we used Feature Branching
Why we used Feature BranchingWhy we used Feature Branching
Why we used Feature Branching
 
Webinar: Automate Your Environment Provisioning for Mobile App Development
Webinar: Automate Your Environment Provisioning for Mobile App Development Webinar: Automate Your Environment Provisioning for Mobile App Development
Webinar: Automate Your Environment Provisioning for Mobile App Development
 
Version Control - Patterns and Practices
Version Control - Patterns and PracticesVersion Control - Patterns and Practices
Version Control - Patterns and Practices
 
Service Virtualization: Delivering Complex Test Environments on Demand
Service Virtualization: Delivering Complex Test Environments on DemandService Virtualization: Delivering Complex Test Environments on Demand
Service Virtualization: Delivering Complex Test Environments on Demand
 
Cisco and Splunk: Under the Hood of Cisco IT Breakout Session
Cisco and Splunk: Under the Hood of Cisco IT Breakout SessionCisco and Splunk: Under the Hood of Cisco IT Breakout Session
Cisco and Splunk: Under the Hood of Cisco IT Breakout Session
 
Webinar: Is Your Storage Ready for Disaster?
Webinar: Is Your Storage Ready for Disaster?Webinar: Is Your Storage Ready for Disaster?
Webinar: Is Your Storage Ready for Disaster?
 
Google Wallet: The Fanatics Experience
Google Wallet: The Fanatics ExperienceGoogle Wallet: The Fanatics Experience
Google Wallet: The Fanatics Experience
 
[@NaukriEngineering] Feature Toggles
[@NaukriEngineering] Feature Toggles[@NaukriEngineering] Feature Toggles
[@NaukriEngineering] Feature Toggles
 
Chrome release cycle
Chrome release cycleChrome release cycle
Chrome release cycle
 
[@NaukriEngineering] BDD implementation using Cucumber
[@NaukriEngineering] BDD implementation using Cucumber[@NaukriEngineering] BDD implementation using Cucumber
[@NaukriEngineering] BDD implementation using Cucumber
 
Entregas Contínuas com feature toggles
Entregas Contínuas com feature togglesEntregas Contínuas com feature toggles
Entregas Contínuas com feature toggles
 
Pull requests and testers can be friends
Pull requests and testers can be friendsPull requests and testers can be friends
Pull requests and testers can be friends
 
Who will test your tests?
Who will test your tests?Who will test your tests?
Who will test your tests?
 
Continuous Visual Integration - RailsConf 2016 - Mike Fotinakis - Percy.io
Continuous Visual Integration - RailsConf 2016 - Mike Fotinakis - Percy.ioContinuous Visual Integration - RailsConf 2016 - Mike Fotinakis - Percy.io
Continuous Visual Integration - RailsConf 2016 - Mike Fotinakis - Percy.io
 
Overcoming the fear of deployments
Overcoming the fear of deploymentsOvercoming the fear of deployments
Overcoming the fear of deployments
 
Continuous Integration, Delivery and Deployment
Continuous Integration, Delivery and DeploymentContinuous Integration, Delivery and Deployment
Continuous Integration, Delivery and Deployment
 
Refactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech TalkRefactoring for Software Design Smells - Tech Talk
Refactoring for Software Design Smells - Tech Talk
 

Semelhante a Feature toggles

Application Lifecycle Management with TFS
Application Lifecycle Management with TFSApplication Lifecycle Management with TFS
Application Lifecycle Management with TFS
Mehdi Khalili
 
Visual Studio Team System 2010
Visual Studio Team System 2010Visual Studio Team System 2010
Visual Studio Team System 2010
ukdpe
 

Semelhante a Feature toggles (20)

Refactoring
RefactoringRefactoring
Refactoring
 
Feature Flags. Reducing risks during shipping changes/
Feature Flags. Reducing risks during shipping changes/Feature Flags. Reducing risks during shipping changes/
Feature Flags. Reducing risks during shipping changes/
 
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений" Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
 
Application Lifecycle Management with TFS
Application Lifecycle Management with TFSApplication Lifecycle Management with TFS
Application Lifecycle Management with TFS
 
Xp conf-tbd
Xp conf-tbdXp conf-tbd
Xp conf-tbd
 
Combined Project
Combined ProjectCombined Project
Combined Project
 
KSCOPE 2015 - Improving Reliability, Rollouts, Upgrades/Migrations
KSCOPE 2015 - Improving Reliability, Rollouts, Upgrades/MigrationsKSCOPE 2015 - Improving Reliability, Rollouts, Upgrades/Migrations
KSCOPE 2015 - Improving Reliability, Rollouts, Upgrades/Migrations
 
Ddc2011 효과적으로레거시코드다루기
Ddc2011 효과적으로레거시코드다루기Ddc2011 효과적으로레거시코드다루기
Ddc2011 효과적으로레거시코드다루기
 
BDD with SpecFlow and Selenium
BDD with SpecFlow and SeleniumBDD with SpecFlow and Selenium
BDD with SpecFlow and Selenium
 
Jenkins as the Test Reporting Framework
Jenkins as the Test Reporting FrameworkJenkins as the Test Reporting Framework
Jenkins as the Test Reporting Framework
 
Trunk based development
Trunk based developmentTrunk based development
Trunk based development
 
Introduction to Integration Tests in Magento / Adobe Commerce
Introduction to Integration Tests in Magento / Adobe CommerceIntroduction to Integration Tests in Magento / Adobe Commerce
Introduction to Integration Tests in Magento / Adobe Commerce
 
Introduction to Integration Tests in Magento / Adobe Commerce
Introduction to Integration Tests in Magento / Adobe CommerceIntroduction to Integration Tests in Magento / Adobe Commerce
Introduction to Integration Tests in Magento / Adobe Commerce
 
Software Testing for SEO
Software Testing for SEOSoftware Testing for SEO
Software Testing for SEO
 
Branching Strategies: Feature Branches vs Branch by Abstraction
Branching Strategies: Feature Branches vs Branch by AbstractionBranching Strategies: Feature Branches vs Branch by Abstraction
Branching Strategies: Feature Branches vs Branch by Abstraction
 
PHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for BeginnersPHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for Beginners
 
Visual Studio Team System 2010
Visual Studio Team System 2010Visual Studio Team System 2010
Visual Studio Team System 2010
 
Launch safely with Feature Flags
Launch safely with Feature FlagsLaunch safely with Feature Flags
Launch safely with Feature Flags
 
Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)
 
SDLC and Software Process Models
SDLC and Software Process ModelsSDLC and Software Process Models
SDLC and Software Process Models
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Feature toggles

  • 4.  Pros  Code for new feature could not make to production  No fear to check-in in branch  Cons  Merge hell  Fear of refactoring  Difficult to share code across branches
  • 6.  Pros  Avoid big merges  Each check-in is production ready  Continuously Integrate thorough out the progress path of the feature  Cons  Incomplete feature may go to production  Fear to commit code
  • 7. Then how to do Continuous Integration? Feature Toggles
  • 9. It’s a simple if statement
  • 10. Feature toggle is a if statement that hides certain execution path
  • 11. Types of Feature toggle  Release toggles  Business toggles
  • 12. Release Toggles  To hide incomplete feature  Short lived  Removed as soon as feature is ready  Have pre-decided values across environments (except dev)
  • 13. Business Toggles  To enable A / B testing  Release feature to certain groups of people to get early feedback  Could be enabled or disabled on the fly
  • 14. Testing the Toggles  Unit Test  Test for both conditions i.e. toggle on and off  Integration Test  Test with toggle states that are going live  Test with toggle on  With business toggles be smart about what you want to test than try and test all combinations
  • 15. Tips and tricks to implement Feature Toggle
  • 16. In case of building new API end point that is not public facing No feature toggle needed
  • 17. In case of creating new model or table No feature toggle needed
  • 18. In case of adding a new column in database and exposing it through service No feature toggle needed May feature toggle validations or provide default value
  • 19. In case of new endpoint that is public facing Just feature toggle the url
  • 20. In case of UI component embedded in existing page Feature toggle the view element
  • 21. In case of logic change like change the way payment is processed Feature toggle by abstraction
  • 22. Things to keep in mind  Don’t try to toggle each and every line of code. Use only where its needed.  Keep the number of toggles under control  Try to create mutually exclusive toggles  Clean up release toggles and dead code
  • 23. Ways to implement toggles  Config file  Toggle manager for Admin to manage  Cookie store  … or whatever that makes sense
  • 24. They are riding on the same boat
  • 25. Feature Toggle is second best solution. The best solution is to find a way to gradually integrate, without Feature Branches or Feature Toggles. Martin Fowler
  • 26. No free lunch  Good test suite (unit and acceptance)  Fix or Revert the breaking change immediately  Break down features into smaller stories  Break down stories into smaller tech tasks  Think of how to take your code to production everyday than creating blockers
  • 27. References  http://martinfowler.com/bliki/FeatureToggle.html  http://www.infoq.com/presentations/Feature-Bits  http://blog.pluralsight.com/favor-feature-toggles- over-feature-branches  http://paulhammant.com/blog/branch_by_abstracti on.html  http://labs.spotify.com/2014/03/27/spotify- engineering-culture-part-1/