SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

En vedette

Why we used Feature Branching
Why we used Feature BranchingWhy we used Feature Branching
Why we used Feature Branching
Alan Parkinson
 
Trunk Based Development (CBSoft 2011)
Trunk Based Development (CBSoft 2011)Trunk Based Development (CBSoft 2011)
Trunk Based Development (CBSoft 2011)
Wildtech
 
Strategies in continuous delivery
Strategies in continuous deliveryStrategies in continuous delivery
Strategies in continuous delivery
Aviran Mordo
 
Feature Toggles
Feature TogglesFeature Toggles
Feature Toggles
Devi Sridharan
 
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
tobych
 

En vedette (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
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
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
 
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, ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Entregas Contínuas com feature toggles

Notes de l'éditeur

  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?