A simple way to implement a feature flag in Nuxeo
(How to enable/disable features on the server without any code changes by setting a property in nuxeo.conf)
“A feature flag is a software development process used to enable or disable functionality remotely without deploying code. New features can be deployed without making them visible to users. Feature flags help decouple deployment from release letting you manage the full lifecycle of a feature”
What’s a feature flag?
The previous quote is highlighted by Google as the main response if I search for “feature flag” and I think it’s a pretty good response. If you are a developer but you are not familiar with the name, just think about the last time your product owner asked you something like: “Can we hide this functionality in production with the next release? It’s not production ready yet, but we do need it enabled in UAT for more testing”.
Or maybe it was a slightly different version of the same question: “Can you add something so that this awesome bulk edit feature that we recently implemented gets enabled only for the media Assets? We don’t want to allow users to edit Contracts in bulk for now” ( *Asset and Contract could be different document types in Nuxeo)
This can be done really easily in many different ways, by simply hiding the functionality to the users with an out of box nuxeo-filter around your custom UI button. However, the entire idea behind a feature flag is that you should not need to make any code changes to enable the functionality back when needed (you can read more about when and if it’s a good idea to use feature flags here — this blog is only about how to implement one in Nuxeo).