Update run_sidekiq_jobs and drop_sidekiq_jobs FF to use request as actor
The percentage of time is used in the run_sidekiq_jobs and drop_sidekiq_jobs FF to control the behavior of Sidekiq jobs. These FFs control whether a worker should defer (setting run_sidekiq_jobs FF to false) or drop (drop_sidekiq_jobs FF is true) the execution of a job.
% of time allows us to roll out worker in question back to execution safely in a throttled way(see the flow chart in https://gitlab.com/gitlab-com/runbooks/-/blob/master/docs/sidekiq/deferring-jobs.md#2-using-feature-flags-via-chatops)
Since ChatOps deprecated the usage of percentage of time in gitlab-com/chatops!400 (merged) and a request-based actor is added in gitlab-org/gitlab!132078 (merged), we could use the request as an actor to achieve the similar % of time behavior.
Tasks:
-
Update calls to Feature.enabled?to useFeature.current_requestas the actor (https://gitlab.com/gitlab-org/gitlab/-/blob/e2b63f1e8fcd71800b7482b6293c20a8627504da/lib/gitlab/sidekiq_middleware/skip_jobs.rb#L68-68 and https://gitlab.com/gitlab-org/gitlab/-/blob/e2b63f1e8fcd71800b7482b6293c20a8627504da/lib/gitlab/sidekiq_middleware/skip_jobs.rb#L95-95) -
Update runbooks doc example for ChatOps example /chatops run feature set run_sidekiq_jobs_SlowRunningWorker --actors 10 --ignore-feature-flag-consistency-check