Ban use of License in ApplicationSetting model
What does this MR do and why?
The model ApplicationSetting
has validations that in turn run License.feature_available?
check. This creates a cyclical dependency between the ApplicationSetting
record being created and the License
class that in turn depends on the presence of ApplicationSetting
record.
We have an existing spec that verifies that:
As an additional validation we want to create a Rubocop rule to ban the use of License.feature_available?
in ApplicationSetting
and Gitlab::CurrentSettings
, since their presence can cause cyclical dependencies.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Related to #424200