Commit 47af82c2 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch '232934-feature-flag-rollout-of-sidekiq_versioning' into 'master'

[Feature flag] Rollout of `sidekiq_versioning`

Closes #232934

See merge request gitlab-org/gitlab!39562
parents 2f86bc74 4bfc431f
---
title: Provide versioning support to Sidekiq workers
merge_request: 39562
author:
type: other
---
name: sidekiq_versioning
introduced_by_url:
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/232934
group: group::fulfillment
type: development
default_enabled: false
\ No newline at end of file
......@@ -4,7 +4,7 @@ module Gitlab
module SidekiqVersioning
class Middleware
def call(worker, job, queue)
worker.job_version = job['version'] if worker.is_a?(ApplicationWorker) && Feature.enabled?(:sidekiq_versioning)
worker.job_version = job['version'] if worker.is_a?(ApplicationWorker)
yield
end
......
......@@ -44,17 +44,5 @@ RSpec.describe Gitlab::SidekiqVersioning::Middleware do
expect { call! }.not_to raise_error
end
end
context 'when sidekiq_versioning is disabled' do
before do
stub_feature_flags(sidekiq_versioning: false)
end
it 'does not set job_version' do
expect(worker).not_to receive(:job_version=)
call!
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment