feat: support feature flags
What does this merge request do and why?
This MR allows us to adopt the Feature flags in the development of GitLab workflow in AI Gateway, which is a crucial piece for safe deployment by gradually rolling out the change to end-users.
Related to Create a sustainable 'feature flag' option for ... (#555 - closed)
GitLab-Rails counterpart: Allow to push feature flags to AI gateway (gitlab-org/gitlab!163282 - merged)
How to set up and validate locally
- Checkout Allow to push feature flags to AI gateway (gitlab-org/gitlab!163282 - merged)
- Follow gitlab-org/gitlab!163282 (diffs):
2. Push a feature flag from GitLab-Rails/Sidekiq. i.e.
Gitlab::AiGateway.push_feature_flag(:new_prompt_template, user)3. Use the feature flag in AI Gateway. i.e.if feature_flags.is_enabled("new_prompt_template"). gdk start- Execute a Duo Chat feature and confirm that the flag state in AI Gateway reflects the flag state in GitLab-Rails.
- You can also confirm in the ai-gateway.log.
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.
Edited by Shinya Maeda