Implement feature flags for pages
Problem to solve
ATM we are trying to roll out configuration for pages through API and we added .json
config to as the way to set specific domains/percentage-rollout.
But configuring this requires SRE effort which delays our testing.
Proposed solution
As we discussed on pages call, we'd like to have some mechanism for feature flags for pages accessible to developers.
It will not help us with current problem since we most likely will finish these tests by the time this issue is implemented.
But it may help us with future feature implementation.
Some alternatives:
Add specific call to internal pages API
@grzesiek's idea(please correct the description, if I got it wrong)
- Add a new call to https://gitlab.com/gitlab-org/gitlab/blob/b29ddc70152e47bfbcd62e76cb59c591fbb7d8b2/lib/api/internal/pages.rb#L20 returning the list of feature flags enabled for GitLab Pages
- GitLab Pages retrieves this information periodically, once every few minutes
- In gitlab-rails we need to enumerate feature flags that are GitLab Page specific so that we can easily check their state
- In gitlab-rails we expose global feature flags, and per-domain feature flags with optional metadata (this connects with the following point)
Use domains API
Just add the information about enabled feature flags to response for domain configuration.
Dogfood gitlab feature flags
This is probably not the best option since we lose all the infrastructure around feature flags.
And if we implement feature flags in one of the previous ways, we will migrate to GitLab's feature flags the same moment as GitLab rails app migrate.
cc @jhampton @jmeshell @nolith @nick.thomas @grzesiek @krasio