Gitaly features to be enabled by default on `dev.gitlab.org` and developer instances
Currently a feature can be:
OPT-IN
OPT-OUT
DISABLED
When a feature is OPT-IN
, it will remain disabled until it is manually enabled (individually): for a production-like environment this may be many weeks after the development has finished when it lands on dev.gitlab.org
In order to speed up the development process, we're going to change this.
In future, the logic for OPT-IN
is:
- Feature is
OPT-IN
?- Is the feature flag configured?
- Yes? Use the feature flag setting to determine the feature status?
-
No?
-
Rails.env.development? => true
: the feature is enabled - Otherwise, use the result of
Feature.get("gitaly_super_toggle").enabled
-
- Is the feature flag configured?
This means that developers will get Gitaly features enabled unless they specifically opt-out. On dev.gitlab.org
we will enable gitaly_super_toggle
and disable badly behaving features individually, rather than the other way around.
Since Feature.get("gitaly_super_toggle").enabled
is false in production environments other that dev.gitlab.org
this will not affect Canary, Staging or Production, although in future I would consider enabling gitaly_super_toggle
in Staging, Canary or both.
How to disable a feature in a development environment
If a feature is found to be malfunctioning, the usual process for disabling still works:
-
In
rails-console
disable the feature.Feature.get("gitaly_FEATURE_NAME").disable
. This will set the feature tofalse
(which is different from not-configured) and will therefore turn the feature off as per the usual behaviour. -
Submit an MR totally disabling the feature for everyone by setting it's status to
DISABLED
This means that developers can still opt-out of features in their local development environment but now the default for development is OPT_OUT
not OPT_IN
...