---
title: "Discussion on \"Dev Flags: Supercharge your Continuous Deployment by Dropping Database Feature Toggles\" | Hashnode"
description: "Discussion on \"Dev Flags: Supercharge your Continuous Deployment by Dropping Database Feature Toggles\". Those of us who use  Trunk Based Development  as the foundation of our approach to  Continuous Delivery or continuous Deployment  are familiar with the use of  Feature Toggles  to prevent work in progress changes becoming prematurely available to cus..."
url: "https://hashnode.com/posts/dev-flags-supercharge-your-continuous-deployment-by-dropping-database-feature-toggles/615925e4e2f1936f70b27306"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Dev Flags: Supercharge your Continuous Deployment by Dropping Database Feature Toggles](https://antman-does-software.com/dev-flags-supercharge-your-continuous-deployment-by-dropping-database-feature-toggles?utm_source=hashnode&utm_medium=feed)

Those of us who use Trunk Based Development as the foundation of our approach to Continuous Delivery or continuous Deployment are familiar with the use of Feature Toggles to prevent work in progress changes becoming prematurely available to cus...

Oct 3, 2021 · 4 min read · antman-does-software.com  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)
-   [#devops](https://hashnode.com/tag/devops)
-   [#continuous-deployment](https://hashnode.com/tag/continuous-deployment)

## Written by

[Anthony Manning-Franklin](https://hashnode.com/@Antman261)

@Antman261 · Perth, Australia

  
[View profile](https://hashnode.com/@Antman261)

Drunk on types and functional programming

Former CTO of SKUTOPIA I write about Functional Programming, TypeScript, Node, Event Sourcing, and engineering leadership

## Responses 1

Markdown supported · ⌘↵ to post

[TruongTX](https://hashnode.com/@tmtxt)

[Mar 11, 2022](https://hashnode.com/posts/dev-flags-supercharge-your-continuous-deployment-by-dropping-database-feature-toggles/615925e4e2f1936f70b27306/comment/622aa3aa6810179d5b053290)

Hah, quite similar to what we did at FMG. We follow 12factor app principles, those config are retrieved from env flags. We have some layers for generating the env vars, from ansible vars files (which is also in source control) and from the CI server for credentials. Each environment (dev, stg, prod) has its own Ansible file, where you can define which feature you want to turn on and monitor via source control. We store those config in source control but not in js/ts code. Your code tight to only those 3 env. Putting it in Ansible allows us to decouple the env with the logic code. It also helps us spin up a new environment easily, test env for example, or maybe multiple stg environments if you have multiple teams.

[Anthony Manning-Franklin](https://hashnode.com/@Antman261)

[Mar 12, 2022](https://hashnode.com/posts/dev-flags-supercharge-your-continuous-deployment-by-dropping-database-feature-toggles/615925e4e2f1936f70b27306/comment/622aa3aa6810179d5b053290#reply-622c1be7c86eecb52b371eb7)

Yeah embedding the config in the application code is definitely a trade-off! Limiting it to dev/prd in the code has the benefits that it is very explicit what the expected production behaviour is for all developers working on main, all the way through to the InteliSense in their IDE.

On the other hand, it reduces flexibility in terms of deploying ephemeral environments. However, I find that use case comes up much less often -- the idea of deploying a new environment for every open pull request for example, doesn't seem advantageous. Doing so would slow down pull request cycle time, which naturally leads developers to make bigger pull requests, which further slows the time to close each PR while also increasing the risk of change fail.

The case where ephemeral environments have the most benefit is in planning for large migrations, where teams may need extensive exploratory testing and/or rehearsals of runsheets. In those instances, adding additional config is comparatively trivial.
