Put pre-enforcement storage banner behind a feature flag
What does this MR do and why?
Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/350632
This put's the pre-enforcement storage banner under a feature flag so we can control when we display the banner.
We have a few constraints to show this banner:
- User needs to be able to admin namespace
- Namespace needs to be free
- We need to have a date for when the enforcement starts
- User haven't dismissed the banner yet
So the issue here is that, at the minute we commit+deploy the enforcement date, the banner will start showing to all the users that meet the criteria above. We need a way to stop/start showing the banner, hence the feature flag.
Screenshots or screen recordings
No UI changes at this point, so just showing the banner as is:
How to set up and validate locally
- Open your local GitLab and go to a free group
- Make sure the banner does not appear
- To make the banner appear:
- Either enable this FF:
Feature.enable(:namespace_storage_limit_bypass_date_check)
- Or replace
nil
withDate.current
in thestorage_enforcement_date
method
- Either enable this FF:
- Make sure the banner does NOT appear (the FF guard clause is working)
- Enable the FF:
Feature.enable(:namespace_storage_limit_show_preenforcement_banner)
- Make sure the banner appear
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Sheldon Led