Ignore `default_enabled` value in `Feature.enabled?` [RUN ALL RSPEC] [RUN AS-IF-FOSS]
What does this MR do?
Contributes to #271275 (closed)
Ignores default_enabled
argument in Feature.enabled?
. Takes default_enabled
value from the feature flag definition file instead.
That should ensure that everything works as expected without default_enabled
argument.
As a side note, default_enabled
argument value is always in sync with the default_enabled
value in the YAML definition file.
We cannot even set the argument value to be different from the one specified in the YAML file.
To make the MR smaller and enable ability to remove default_enabled
from Feature.enabled?
calls in chunks, I think we can make the following changes separately.
The only part I'm not sure about is either should we update the docs now to mention that the argument it ignored, or leave it till we change the docs after removing default_enabled
argument completely.
Follow-up changes
-
Remove default_enabled
fromFeature.enabled?
calls -
Remove default_enabled
argument fromFeature.enabled?
-
Remove default_enabled
fromFeature::Definition.valid_usage!
-
Updated docs: Remove mentions of default_enabled
-
Add a changelog entry (?)
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?- [-] I have included a changelog entry.
- [-] I have not included a changelog entry because _____.
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides - [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team