GitLab API endpoint to return defined SaaS experiments using experimentation.rb
Expose defined experiments and status on GitLab.com using the existing experimentation.rb
in an API endpoint.
- experiment key
- status (active or not - we don't need percentages, groups, etc at this stage).
- 'relatively' up to date (caching for hours, but less than a day, is acceptable).
A production ready version of:
experiment_statuses = []
Gitlab::Experimentation::EXPERIMENTS.each do | experiment_config |
# Feature.get(experiment[0]).percentage_of_time_value > 0
experiment_key = experiment_config[0]
experiment_statuses << { key: experiment_key, enabled?: Gitlab::Experimentation.enabled?(experiment_key) }
end
experiment_statuses.to_json
In the first instance, consumers of this endpoint are GitLab Team Members (support, SREs, development, product).