SlideShare a Scribd company logo
1 of 37
Entregas contínuas com
Feature Toggles
Who am
I?Solon Aguiar
@solonbaneto
saguiar@thoughtworks.com
www.solonaguiar.com
Once upon a
time…
49 repos!
How to avoid
unfinished/unaccepted
features to impact UX?
What if… if!
- if toggle_on?(:boleto)
li
= f.radio_button :type …
Inside the view!
def toggle_on?(key)
@toggles ||= @redis.smembers TOGGLE_SET
@toggles.include? key.to_s
end
toggle_off :boleto
it 'does not show boleto as a payment method' do
rendered.should_not have_field ‘boleto’
end
toggle_on :boleto
it ’shows boleto as a payment method' do
rendered.should have_field ‘boleto’
end
Not so easy, mes
amis
Develop
story
Create
toggle
Manage
toggle
declare in
puppet
set value and
description in
csv
1 + 2 = 4
toggles:
customer_qa:
- payment_with_boleto
tw_qa:
- payment_with_installments
toggles:
active_groups:
- accepted
- customer_qa
overrides:
payment_with_installments: on
Toggles
Groups
Overrides
Environments
divided
activate
withinactivate
deactivate
Entregas Contínuas com feature toggles
Entregas Contínuas com feature toggles
Entregas Contínuas com feature toggles

More Related Content

Viewers also liked

Why we used Feature Branching
Why we used Feature BranchingWhy we used Feature Branching
Why we used Feature BranchingAlan Parkinson
 
Requirement and Test for Continuous Delivery - Customer in focus at Scania Co...
Requirement and Test for Continuous Delivery - Customer in focus at Scania Co...Requirement and Test for Continuous Delivery - Customer in focus at Scania Co...
Requirement and Test for Continuous Delivery - Customer in focus at Scania Co...Jonatan Mossberg
 
Trunk Based Development (CBSoft 2011)
Trunk Based Development (CBSoft 2011)Trunk Based Development (CBSoft 2011)
Trunk Based Development (CBSoft 2011)Wildtech
 
Feature Toggle Examples
Feature Toggle ExamplesFeature Toggle Examples
Feature Toggle ExamplesWildtech
 
Feature Flags Are Flawed: Let's Make Them Better
Feature Flags Are Flawed: Let's Make Them BetterFeature Flags Are Flawed: Let's Make Them Better
Feature Flags Are Flawed: Let's Make Them BetterStephen Young
 
Strategies in continuous delivery
Strategies in continuous deliveryStrategies in continuous delivery
Strategies in continuous deliveryAviran Mordo
 
Feature flags to speed up & de risk development
Feature flags to speed up & de risk developmentFeature flags to speed up & de risk development
Feature flags to speed up & de risk developmentLaunchDarkly
 
Feature Flagging to Reduce Risk in Database Migrations
Feature Flagging to Reduce Risk in Database Migrations Feature Flagging to Reduce Risk in Database Migrations
Feature Flagging to Reduce Risk in Database Migrations LaunchDarkly
 
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 GulatiXP Conference India
 
Multiple projects, different goals, one thing in common: the codebase!
Multiple projects, different goals, one thing in common: the codebase!Multiple projects, different goals, one thing in common: the codebase!
Multiple projects, different goals, one thing in common: the codebase!Carlos Lopes
 
Waffle: A feature switch/flag/toggle application for Django
Waffle: A feature switch/flag/toggle application for DjangoWaffle: A feature switch/flag/toggle application for Django
Waffle: A feature switch/flag/toggle application for Djangotobych
 
Merge hells - Feature Toggles to the rescue
Merge hells - Feature Toggles to the rescueMerge hells - Feature Toggles to the rescue
Merge hells - Feature Toggles to the rescueLeena N
 
DevOps 2017 Conf: evolving from automated to continuous
DevOps 2017 Conf: evolving from automated to continuousDevOps 2017 Conf: evolving from automated to continuous
DevOps 2017 Conf: evolving from automated to continuousArthur Hicken
 
Trunk Based Development in the Enterprise - Its Relevance and Economics
Trunk Based Development in the Enterprise - Its Relevance and EconomicsTrunk Based Development in the Enterprise - Its Relevance and Economics
Trunk Based Development in the Enterprise - Its Relevance and EconomicsPerforce
 
From Continuous Integration to Continuous Delivery and DevOps
From Continuous Integration to Continuous Delivery and DevOpsFrom Continuous Integration to Continuous Delivery and DevOps
From Continuous Integration to Continuous Delivery and DevOpsLuca Minudel
 
Porque Odeio Branches
Porque Odeio BranchesPorque Odeio Branches
Porque Odeio BranchesRafael Petry
 
Development of aorta and pulmonary trunk
Development of aorta and pulmonary trunkDevelopment of aorta and pulmonary trunk
Development of aorta and pulmonary trunkDr Laxman Khanal
 

Viewers also liked (20)

Why we used Feature Branching
Why we used Feature BranchingWhy we used Feature Branching
Why we used Feature Branching
 
Requirement and Test for Continuous Delivery - Customer in focus at Scania Co...
Requirement and Test for Continuous Delivery - Customer in focus at Scania Co...Requirement and Test for Continuous Delivery - Customer in focus at Scania Co...
Requirement and Test for Continuous Delivery - Customer in focus at Scania Co...
 
Trunk Based Development (CBSoft 2011)
Trunk Based Development (CBSoft 2011)Trunk Based Development (CBSoft 2011)
Trunk Based Development (CBSoft 2011)
 
Feature Toggle Examples
Feature Toggle ExamplesFeature Toggle Examples
Feature Toggle Examples
 
Feature Flags Are Flawed: Let's Make Them Better
Feature Flags Are Flawed: Let's Make Them BetterFeature Flags Are Flawed: Let's Make Them Better
Feature Flags Are Flawed: Let's Make Them Better
 
Strategies in continuous delivery
Strategies in continuous deliveryStrategies in continuous delivery
Strategies in continuous delivery
 
Feature Toggles
Feature TogglesFeature Toggles
Feature Toggles
 
Feature flags to speed up & de risk development
Feature flags to speed up & de risk developmentFeature flags to speed up & de risk development
Feature flags to speed up & de risk development
 
Feature Flagging to Reduce Risk in Database Migrations
Feature Flagging to Reduce Risk in Database Migrations Feature Flagging to Reduce Risk in Database Migrations
Feature Flagging to Reduce Risk in Database Migrations
 
Test Automation
Test AutomationTest Automation
Test Automation
 
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
 
Multiple projects, different goals, one thing in common: the codebase!
Multiple projects, different goals, one thing in common: the codebase!Multiple projects, different goals, one thing in common: the codebase!
Multiple projects, different goals, one thing in common: the codebase!
 
Waffle: A feature switch/flag/toggle application for Django
Waffle: A feature switch/flag/toggle application for DjangoWaffle: A feature switch/flag/toggle application for Django
Waffle: A feature switch/flag/toggle application for Django
 
Merge hells - Feature Toggles to the rescue
Merge hells - Feature Toggles to the rescueMerge hells - Feature Toggles to the rescue
Merge hells - Feature Toggles to the rescue
 
DevOps 2017 Conf: evolving from automated to continuous
DevOps 2017 Conf: evolving from automated to continuousDevOps 2017 Conf: evolving from automated to continuous
DevOps 2017 Conf: evolving from automated to continuous
 
Feature Toggles On Steroids
Feature Toggles On SteroidsFeature Toggles On Steroids
Feature Toggles On Steroids
 
Trunk Based Development in the Enterprise - Its Relevance and Economics
Trunk Based Development in the Enterprise - Its Relevance and EconomicsTrunk Based Development in the Enterprise - Its Relevance and Economics
Trunk Based Development in the Enterprise - Its Relevance and Economics
 
From Continuous Integration to Continuous Delivery and DevOps
From Continuous Integration to Continuous Delivery and DevOpsFrom Continuous Integration to Continuous Delivery and DevOps
From Continuous Integration to Continuous Delivery and DevOps
 
Porque Odeio Branches
Porque Odeio BranchesPorque Odeio Branches
Porque Odeio Branches
 
Development of aorta and pulmonary trunk
Development of aorta and pulmonary trunkDevelopment of aorta and pulmonary trunk
Development of aorta and pulmonary trunk
 

Recently uploaded

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Recently uploaded (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

Entregas Contínuas com feature toggles

Editor's Notes

  1. Explicar um pouco o contextoprojetoNãopossofalarnomesnemexemplosreais
  2. Explicarporcima a arquiteturaTem váriosserviçosecommerce é o que o usuáriovê
  3. Ruby, rails, sinatraPuppet paraprovisionamentoRedisparaconfiguracoesMongo para storage
  4. Pessoasespalhadasem 3 lugaresdiferentesQueria-se diminuir o tempo gastofazendo merges de código
  5. Time grandeEstóriasemparaleloNo release manager (cherry picking)
  6. Where all the people came from
  7. Processo de QA lentoEstóriasdemoravam a seraceitospeloclienteBoletos (demoroumuitoparaseraceito)Nãoqueria-se demorarparaintegrar o código.
  8. Jáestávamosemprodução.Deployments constantes e/ouemergenciais com bug fixes.Pipeline nãopoderiaficarbloqueadoporalgonãoterminado
  9. Resumindo…Varioslugates (tw e cliente)Estavanaproducao (poderiaprecisar de um bugfix a qualquermomento)Processo de qa lentoTime diverso
  10. While maintaining one branch
  11. E se vocêtivesseumamaneira de sóligaroudesligarcoisasquenãoestivessemprontas. E se vocêsópudessedecidir: “Issonãoestá pronto, o usuárionãodeveutilizar” ou “Issojáestá pronto, mas euqueroexperimentar um pouco”.
  12. Decidimosutilizar feature toggles (feature flippers, gatekeepers)Ideiabastante simplesEsconder a funcionalidadeportrás de algoquecontrole
  13. Digamosque se estejaadicionando um novo tipo de pagamento (boleto)Demora a implementarMexeemváriosrepositoriosNão se podeirpara prod semtestarbem (muitoscenarios)
  14. Implementaçãoqueusa toggles
  15. Enfatizarqueéfeitodiretonainterfacetbexiste o cenarioonde o toggle simplesmenteesconde o link parauma nova area q estásendodesenvolvida;
  16. Ferramentasutilizadas.Puppet paraconfigurar e redisparaguardar as chavesvalores.Jáeramutilizadasparaoutrasconfiguraçoes da aplicação.Foramadotadastambémpara toggles
  17. ImplementaçãoquetornaissopossívelUsa um cache paraevitarbater no redistodahora e sermaisrápidoSóvê se a chaveestánalista de toggles
  18. A mudançaparece simples, mas éprecisoalterar a cultura.Tivemosqueadquirirnovoshábitos (o clientetambém).Foipreciso tempo e disciplinaparapoderdeixar o processofluido
  19. Healthy code: always deployable.Keep build always green and new functionalities behind a toggle (might need emergency deployments)Parte da estóriaemsi era criar um toggle e deixá-lo desligado.
  20. Comunicação e alignementdentro do time: - saber o quedeveriaestarligadoounãoemcadaambiente; - saber qual o toggle de cadaestória; - garantirqueestavaatrás de um toggleAlinhar com o cliente o quedeveriairparaprodução
  21. Toggles adicionamcomplexidade no código e nostestestb se devetestarqualquercombinacao de toggles, muitocuidado c/ a explosao combinatorial!Éprecisotestarduassituações: - toggle ligado - toggle desligado
  22. No exemplo anterior precisamostestarque se o toggle estádesligado, nãoémostrado a opção de pagar com boleto…Dizerque o hook sohtira o cara da lista e repoe o estado anterior
  23. No exemplo anterior precisamostestarque se o toggle estádesligado, nãoémostrado a opção de pagar com boleto…Dizerque o hook sohcoloca o caranalista e voltaaoestado anterior
  24. Nãofoitudo um mar de rosas no início
  25. Fluxopadrão.Primeiro e o segundopoderiamserinvertidosProblemaspoderiamocorreremváriosdessesestágios
  26. Fluxopadrão.Primeiro e o segundopoderiamserinvertidosProblemaspoderiamocorreremváriosdessesestágios
  27. Problemaéquenemsemprequemcriava a estóriagerenciava o toggleComo saber o queestáligado?Como saber o queestádisponível?Como trocarestadosfacilmente?
  28. Essadificuldade fez degerenciamento fez com quetivéssemoserros (coisasligadasquedeveriamestardesligadas)
  29. Decidimosque o processoestavaconfuso (muitacoisapraconfigurar e difícilconhecerestados).Partimosparaumaimplementaçãoqueusayaml e feature groups paraos toggles (agrupavaporestados) e ambientestinhamosestadosquedeveriamestarativados e potencias overrides
  30. Toggles foramagrupadosparafacilitar (propriadivisao do yamlfacilitouisso)
  31. Toggles agrupadosformam a configuracao de um ambiente
  32. Implementaçãoutilizada (groups: tw_qa, custormer_qa, accepted, development). Saber o queestáligadooudisponívelpodeserfacilmentevisto com operaçoes de setMaisfácil o controle de versao e alteracaodiretoem prod
  33. EmalgumassituaçoesnaofoifácilMudar um modelo, porexemplo, foicomplicado.Nãopoderíamossimplesmenteesconder a UI parapreencheressescampos. Quando fosse salvar o modelo, dariaproblemaporquealgunscamposseriamnecessarios. Para workaround disso, tivemosqueColocarvalores default paraeeles e esconder o preenchimentojunto do toggle.servicosnaoeramexternos (poderialimitar o toggle aoservico)schemalessQuando se tem muitospontos de entradatambémnãoérecommendávelusar toggles.
  34. Antes de cada deploy era precisoverificar se todas as estóriasestavamligadas, alinhar com o cliente o quedeveriairligadoounao e colocarisso no código.Quandotirar o toggle do código?