Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Snippets
  • Register
  • Sign in
  • chatops chatops
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 61
    • Issues 61
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 4
    • Merge requests 4
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.comGitLab.com
  • chatopschatops
  • Merge requests
  • !355

Add --repository actor tag to feature flag command

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Quang-Minh Nguyen requested to merge qmnguyen0711/4550-add-repository-repository-actor-support-to-chatops into master Nov 23, 2022
  • Overview 13
  • Commits 1
  • Pipelines 3
  • Changes 3

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

Screenshot_2022-11-24_at_16.02.21

Screenshot_2022-11-24_at_16.02.46

Enable a Snippet repository

feature set --repository=qmnguyen0711/gitlab.git,qmnguyen0711/gitlab/snippets/227.git gitaly_mep_mep true --dev

Screenshot_2022-11-24_at_16.03.46

Screenshot_2022-11-24_at_16.03.59

Edited Nov 29, 2022 by Quang-Minh Nguyen
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: qmnguyen0711/4550-add-repository-repository-actor-support-to-chatops