Sets ReactiveCaching limits only for Environment
What does this MR do?
Related issues: https://gitlab.com/gitlab-org/gitlab/-/issues/14015, #202633 (closed), #209266 (closed), https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/9440
After enabling ReactiveCaching
limits live behind the reactive_cache_limit
, we found out that this can unfold many side-effects in different areas of the codebase. Thus, we decided to take modular approach and start adding those limits per sections of the codebase.
This MR takes care of enabling the limits check for the Environment
model.
It'll be behind a feature flag: reactive_cache_limit_environment
It'll remove the global feature flag reactive_cache_limit
, since it won't be needed for the modular approach.
It'll disable ReactiveCaching
limits by default for all classes, regardless of FF. This will be done by setting this by default: self.reactive_cache_hard_limit = nil
. The idea is that, limits will only be enabled if this value is overridden by the class that includes ReactiveCaching
with a megabytes quantity. E.g.:
self.reactive_cache_hard_limit = 1.megabyte
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
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