Skip to content
Snippets Groups Projects
Commit b5271d19 authored by Marco (Gregorius)'s avatar Marco (Gregorius) :palm_tree:
Browse files

Merge branch 'mg-add-worker-ff-type' into 'master'

Add new feature flag type called `worker`

Closes gitlab-com/gl-infra/scalability#2345

See merge request !120590



Merged-by: Marco (Gregorius)'s avatarGregorius Marco <gmarco@gitlab.com>
Approved-by: Gosia Ksionek's avatarGosia Ksionek <mksionek@gitlab.com>
Reviewed-by: Gosia Ksionek's avatarGosia Ksionek <mksionek@gitlab.com>
parents 7f880981 274565f8
No related branches found
No related tags found
No related merge requests found
Pipeline #867836482 passed
Pipeline: GitLab

#867847102

    ......@@ -144,6 +144,13 @@ An `experiment` feature flag should conform to the same standards as a `developm
    although the interface has some differences. An experiment feature flag should have a rollout issue,
    created using the [Experiment Tracking template](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/issue_templates/Experiment%20Rollout.md). More information can be found in the [experiment guide](../experiment_guide/index.md).
    ### `worker` type
    `worker` feature flags are used for controlling Sidekiq workers behavior, such as deferring Sidekiq jobs.
    `worker` feature flags likely do not have any YAML definition as the name could be dynamically generated using
    the worker name itself, e.g. `defer_sidekiq_jobs:AuthorizedProjectsWorker`.
    ## Feature flag definition and validation
    > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/229161) in GitLab 13.3.
    ......
    ......@@ -54,6 +54,17 @@ module Shared
    example: <<-EOS
    experiment(:my_experiment, project: project, actor: current_user) { ...variant code... }
    EOS
    },
    worker: {
    description: "Feature flags for controlling Sidekiq workers behavior (e.g. deferring jobs)",
    optional: true,
    rollout_issue: false,
    ee_only: false,
    default_enabled: false,
    example: '<<-EOS
    Feature.enabled?(:"defer_sidekiq_jobs:AuthorizedProjectsWorker", type: :worker,
    default_enabled_if_undefined: false)
    EOS'
    }
    }.freeze
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment