Skip to content

Legacy Feature Flags Deprecation Plan

Problem to solve

Once the changes introduced by &2130 (closed) are in place we will want to deprecate feature flags created before the change as they will be incompatible with the new system.

Intended users

Personas are described at https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/ -->

  • 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

Proposal

To give user visibility and the opportunity to update, changes need to be introduced in the following phases:

  • Phase 1
    • Milestone %13.1 / %13.2
    • Legacy feature flags are deprecated
    • Allow user to create feature flags in the new system
      • All new feature flags will be created using the new system
      • Legacy feature flags cannot be created
    • Display a warning message in legacy feature flags
      • Message TBD - This feature flag was created using the legacy system. On xx this feature flag will become read-only. Please create a new feature flag. Link to documentation.
    • Legacy flags are indicated with an icon with tooltip in the feature flag list
  • Phase 2
    • Milestone %13.4
    • Legacy feature flags become read-only (#220227 (closed))
    • Display a warning message in legacy feature flags
      • Message TBD - This feature flag was created using the legacy system. On xx this feature flag will be removed. Please create a new feature flag. Link to documentation.
    • Remove the save button from legacy feature flags.
    • Legacy flags are indicated with an icon with tooltip in the feature flag list
  • Phase 3
    • Milestone %14.0
    • Legacy feature flags are removed.
    • Feature flag list only shows feature flags using the new system.

API endpoints that will be deprecated:

All the CRUD operations related to the existing feature flag scopes will be deprecated. This includes, for instance, the following parameters for the New feature flag endpoint:

  • scopes
  • scopes:environment_scope
  • scopes:active
  • scopes:strategies

Similarly, the scopes field on getting a feature flag will be deprecated.

When default_flag's association on Operations::FeatureFlag model is removed, rubocop/cop/default_scope.rb cop should be extended to catch also foo = User ; foo.default_scope usages - more details in !33847 (diffs, comment 357357255)

UX Proposal

Desc Mockup
Phase 1, Phase 2 - Display warning on legacy feature flags image
Phase 1, Phase 2 - Legacy feature flags image

Permissions and Security

Users can only modify feature flags that include environments they have access to.

Documentation

Testing

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

What is the type of buyer?

Edited by Dimitrie Hoekstra