> Is this bad because I now have to do a deployment to enable the feature? ... I would argue as long as your deployments are easy, this is the better way to do things because it reduces the complexity of integrating with a third-party tool. Shoot, even when it's all first party tooling, I prefer a release-flags-and-binary as an atomic unit. If the flags and binary are going out as a single push, it simplifies a lot o…
The problem is when your deployment depends on external state like a database. Code rollbacks are trivial, rolling back state (if you even can) is not.
When deployments are easy, code becomes simpler
31–40 of 124 posts
Re: When deployments are easy, code becomes simpler
#32Example: just use a database table. Query and cache in memory for 60s. If you want, build a simple internal web page or tool to toggle flags. This works, and scales (from experience).
Do many apps really need A/B testing or segmented rollout? Maybe, but probably not.
Re: When deployments are easy, code becomes simpler
#33> Is this bad because I now have to do a deployment to enable the feature? ... I would argue as long as your deployments are easy, this is the better way to do things because it reduces the complexity of integrating with a third-party tool. Shoot, even when it's all first party tooling, I prefer a release-flags-and-binary as an atomic unit. If the flags and binary are going out as a single push, it simplifies a lot o…
The problem is when your deployment depends on external state like a database. Code rollbacks are trivial, rolling back state (if you even can) is not.
Having flags push separately adds another problem on top of data corruption.
Re: When deployments are easy, code becomes simpler
#34Earlier quoted context omitted.
You're in a for a long tail of pain if you have significant uptake. To avoid this, you will need have a clear policy on what you're willing to support (eg versions up to 1 year old, or "major version - 1", etc.), and stick to it. Otherwise, people will expect you to support all of it, forever.
Bug fix releases never get deployed. If you want people to keep up to date with your releases, you either have to provide an automatic update facility that they have to manually turn off (ugh, too hard), or you have to dangle desirable features as carrots in front of them, so that upgrading is exciting instead of a social obligation.
Re: When deployments are easy, code becomes simpler
#35As an aside, those “feature flags as a service” tools have some neat features, but are just way too expensive for what most apps probably need: simple binary flags that can change at runtime. Example: just use a database table. Query and cache in memory for 60s. If you want, build a simple internal web page or tool to toggle flags. This works, and scales (from experience). Do many apps really need A/B testing or segm…
Re: When deployments are easy, code becomes simpler
#36Earlier quoted context omitted.
I'd rather have unfinished feature flagged code in master (and therefore production) than have the same unfinished code withering in a long running branch, diverging from master and causing integration problems later. > Either finish your work or delete the unneeded code. It's work in progress. We're working on getting it finished.
>It's work in progress. We're working on getting it finished. So finish it and then I will merge your PR ;) What's the use of putting it in master if it's not finished? It's the author's responsibility to get it merged successfully. If they're taking too long and have to rebase and re-work their code to integrate, that's on them. Pushing it into master is either wasting a reader's time (per the original comment) or,…
Because of the thing I said in the sentence before the one you quoted.
> If they're taking too long and have to rebase and re-work their code to integrate, that's on them.
No, in the organisations I build, we work as a team and if someone is taking too long it's because we don't have the systems in place to help them work faster. There is very clear research on the benefits of working in small batches and integrating continuously. If that research has passed you by then I strongly suggest you go back and take a look.
Re: When deployments are easy, code becomes simpler
#37As an aside, those “feature flags as a service” tools have some neat features, but are just way too expensive for what most apps probably need: simple binary flags that can change at runtime. Example: just use a database table. Query and cache in memory for 60s. If you want, build a simple internal web page or tool to toggle flags. This works, and scales (from experience). Do many apps really need A/B testing or segm…
Re: When deployments are easy, code becomes simpler
#38Re: When deployments are easy, code becomes simpler
#39As an aside, those “feature flags as a service” tools have some neat features, but are just way too expensive for what most apps probably need: simple binary flags that can change at runtime. Example: just use a database table. Query and cache in memory for 60s. If you want, build a simple internal web page or tool to toggle flags. This works, and scales (from experience). Do many apps really need A/B testing or segm…
.env files are the quick and dirty version for simple sites that don't have an admin panel or database.
Re: When deployments are easy, code becomes simpler
#40Earlier quoted context omitted.
The problem is when your deployment depends on external state like a database. Code rollbacks are trivial, rolling back state (if you even can) is not.
If a git commit hash was directly tied to a data hash at that state (IPFS), that would be trivial.
Completely reverting all the state to some point in the past is easy and have been a solved problem for quite a while.
The actual problem is undoing states changes related to the code change, while not losing state changes related to normal system activity.
If I add some new fields to how my web forum records posts, and then find out that it's eating every tenth post and need to revert, it'd be good to not lose and posts made in the meantime.