Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 38,038
    • Issues 38,038
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1,346
    • Merge requests 1,346
  • Requirements
    • Requirements
    • List
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #205409

Closed
Open
Created Feb 13, 2020 by Orit Golowinski@ogolowinskiDeveloper0 of 5 tasks completed0/5 tasks

API for Feature Flag lists

Problem to solve

As part of #13308 (closed) we want to add API support to enable creating/editing/deleting Feature Flags lists (formally known as groups)

Intended users

  • Developers who create feature flags
  • QA engineers enabling/disabling flags
  • Release managers who want to control which features are released and to which customer base
  • Support engineers that wish to release features to beta customers or test version to fix bugs for specific customers

Further details

We want to create lists that users can be associated to - this will serve as a container.

Feature flags can later use these lists in order to enable/disable features per list and environment.

For the first iteration, lists will serve as a simple container.

In the future, we would like to import/export users from a list We would like to create complex lists - not only as a list of users but also users that meet a specific criteria such as email extension (i.e @gitlab.com), belong to a specific customer tier, age (based on create date) etc.

We would later also associate the feature flag list to the epic/issue

Proposal

Breakdown of plan:

  • 1 for the table (possibly done in #35555 (comment 285373560))
  • 1 for CRUD operations(possibly done in #35555 (comment 285373560))
  • 1 Create API
  • 1 Create Unleash API
  • 1 documentation

Public API to be supported:

  • Create list
  • Edit List
  • Delete List

Future consideration (maybe as part of #14728) a list can accept a txt file (comma separated) as a user group

From Unleash Documentation

userWithId

Active for users with a userId defined in the userIds list. Typically I want to enable a new feature only for myself in production before I enable it for everyone else. To achieve this, we can use the “UserWithIdStrategy”. This strategy allows you to specify a list of user IDs that you want to expose the new feature for. (A user id may, of course, be an email if that is more appropriate in your system.)

Parameters

userIds - List of user IDs you want the feature toggle to be enabled for

Similar to Unleash API, where userIDList should be replaced with groupList . groupList contains a userIDList

 {
      "name": "Feature.B",
      "description": "lorem ipsum",
      "enabled": true,
      "strategies": [
        {
          "name": "ActiveForUserWithId",
          "parameters": {
            "userIdList": "123,221,998"
          }
}

Permissions and Security

A group can only be created by someone that is a maintainer of a project or higher.

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Links / references

https://github.com/Unleash/unleash/blob/master/docs/activation-strategies.md

Edited Apr 09, 2020 by Jason Goodman
Assignee
Assign to
12.10
Milestone
12.10 (Past due)
Assign milestone
Time tracking