Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Feature Flags and Controlled Releases

Feature Flags and Controlled Releases

Como ser ágil e realizar entregas contínuas com qualidade e segurança? Nesta talk vamos apresentar como habilitar e desabilitar funcionalidades, produtos, pedaços de código e software releases utilizando flags, mostrando más e boas práticas e casos reais do Moip com uma ferramenta open-source desenvolvida em um Hackday.

Avatar for Lucas Queiroz

Lucas Queiroz

July 19, 2018
Tweet

Other Decks in Programming

Transcript

  1. pen4education Agenda • What are feature-flags? • Common practices •

    Types • Longevity versus dynamism • Release flags • Real cases from Moip • Not a silver bullet • The superhero: IFMAN DEMO!
  2. pen4education What are feature-flags? • Flags = Toggles = Bits

    = Flippers = Switches • Variables used in conditional statements / strategy pattern • A way to modify system behavior • Enable/disable features
  3. pen4education Common practices • Compiled / hardcoded users = ['user1',

    'user2'] • Command-line arguments $ java MyApp user1,user2 • Property files users = user1,user2 • Relational databases > update user set role='admin' where id=1; • Key-value stores > sadd users user1
  4. pen4education • Release • Decouple deployment from releasing • Canary

    releases - can be unstable, bleeding edge • Alternative to feature branches • Ops • Operational aspects of a system • Circuit-breaker • Experiment • A/B testing • Permission • Users permission, freemium model Types
  5. pen4education Release flags • Trunk-based development • Continuous integration, delivery

    and deployment • Small commits / testing culture • Reduce deployment risks • Reduce costs of long lived branches • Escape from merge hell
  6. pen4education Real cases from Moip • Contestation central • Third

    party transfers • Two factor authentication • Checkout • OAuth 2.0 • Registered "boleto"
  7. pen4education Not a silver bullet • Feature flag hell •

    More test scenarios • Keep track of feature-flags' states • Harder to support, debug and replicate problems • Technical debt - "Toggle removal task" onto the team's backlog • Expiration dates (TTL) / fail a test • Limit on the number of dynamic feature flags in a system
  8. pen4education "Your first choice should be to break the feature

    down so you can safely introduce parts of the feature into the product. The advantages of doing this are the same ones as any strategy based on small, frequent releases." - Martin Fowler
  9. pen4education https://github.com/moip Eduardo Colabardini Chapter Leader @ Moip [email protected] @ecolabardini

    Lucas Queiroz Software Engineer @ Moip [email protected] @lucascqueiroz97 Eduardo Colabardini Chapter Leader @ Moip [email protected] @ecolabardini Lucas Queiroz Software Engineer @ Moip [email protected] @lucascqueiroz97 Dúvidas?