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

How to Break the Requirements into User Stories
How to Break the Requirements into User StoriesHow to Break the Requirements into User Stories
How to Break the Requirements into User Stories
ShriKant Vashishtha
 

Mais procurados (20)

Terraform Basics
Terraform BasicsTerraform Basics
Terraform Basics
 
YAML Magic
YAML MagicYAML Magic
YAML Magic
 
Product management class rookie to pro
Product management class rookie to proProduct management class rookie to pro
Product management class rookie to pro
 
Feature flag launchdarkly
Feature flag launchdarklyFeature flag launchdarkly
Feature flag launchdarkly
 
KubeCon EU 2022: From Kubernetes to PaaS to Err What's Next
KubeCon EU 2022: From Kubernetes to PaaS to Err What's NextKubeCon EU 2022: From Kubernetes to PaaS to Err What's Next
KubeCon EU 2022: From Kubernetes to PaaS to Err What's Next
 
Keeping a Secret with HashiCorp Vault
Keeping a Secret with HashiCorp VaultKeeping a Secret with HashiCorp Vault
Keeping a Secret with HashiCorp Vault
 
infrastructure as code
infrastructure as codeinfrastructure as code
infrastructure as code
 
Exposing and Controlling Kafka Event Streaming with Kong Konnect Enterprise |...
Exposing and Controlling Kafka Event Streaming with Kong Konnect Enterprise |...Exposing and Controlling Kafka Event Streaming with Kong Konnect Enterprise |...
Exposing and Controlling Kafka Event Streaming with Kong Konnect Enterprise |...
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQ
 
apidays Paris 2022 - Agile API delivery with Feature Toggles, Rafik Ferroukh,...
apidays Paris 2022 - Agile API delivery with Feature Toggles, Rafik Ferroukh,...apidays Paris 2022 - Agile API delivery with Feature Toggles, Rafik Ferroukh,...
apidays Paris 2022 - Agile API delivery with Feature Toggles, Rafik Ferroukh,...
 
Clean Code @Voxxed Days Cluj 2023 - opening Keynote
Clean Code @Voxxed Days Cluj 2023 - opening KeynoteClean Code @Voxxed Days Cluj 2023 - opening Keynote
Clean Code @Voxxed Days Cluj 2023 - opening Keynote
 
How to Break the Requirements into User Stories
How to Break the Requirements into User StoriesHow to Break the Requirements into User Stories
How to Break the Requirements into User Stories
 
Terraform
TerraformTerraform
Terraform
 
Zero downtime deployment of micro-services with Kubernetes
Zero downtime deployment of micro-services with KubernetesZero downtime deployment of micro-services with Kubernetes
Zero downtime deployment of micro-services with Kubernetes
 
Terraform
TerraformTerraform
Terraform
 
Microservices Architecture & Testing Strategies
Microservices Architecture & Testing StrategiesMicroservices Architecture & Testing Strategies
Microservices Architecture & Testing Strategies
 
Functional Application Logging : Code Examples Using Spring Boot and Logback
Functional Application Logging : Code Examples Using Spring Boot and LogbackFunctional Application Logging : Code Examples Using Spring Boot and Logback
Functional Application Logging : Code Examples Using Spring Boot and Logback
 
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
 
2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures
 
Creating AWS infrastructure using Terraform
Creating AWS infrastructure using TerraformCreating AWS infrastructure using Terraform
Creating AWS infrastructure using Terraform
 

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. Уменьшаем риски при выпуске изменений"
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений" Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
 
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/
 
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

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Ú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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

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/