In gitlab-org/gitaly#4459 (closed), we introduced repository actor for feature flag. This actor uses repository's relative path as flipper_id of feature gate. This new actor is meaningful for Gitaly FF rollout. The Feature API, which powers feature command in chaptops, added the support for repository actor in gitlab-org/gitaly#4549 (closed) (MR: gitlab-org/gitlab!102744 (merged))
It's okay for the repository gate to co-exist with project gate. They point to two different objects. The repository actor type was introduced to support feature flag actor in Gitaly. IIRC, this new actor is only used when passing the flags to Gitaly (source). In this evaluation, if the flag is set for both gitlab-org/foo
project and gitlab-org/gitlab.git
repository, the flag returns true if either of them are available in the current context.
The implementation follows the current way of other repository actors. When calling feature set with a --repository
, it passes the value to feature gate API.
I've test the new flag in my local environment with a test Slack workspace. The displayed "Scoped to" is the flipper_id of the repository. It's the hashed relative path of the repositories.
Enable a normal repository
feature set --repository=qmnguyen0711/gitlab.git --dev
Enable a Snippet repository
feature set --repository=qmnguyen0711/gitlab.git,qmnguyen0711/gitlab/snippets/227.git gitaly_mep_mep true --dev