Commit 88b3beca authored by charlie ablett's avatar charlie ablett

Merge branch '299290-fj-remove-unamespaced-git-garbage-collect-worker' into 'master'

Remove old compatibility class GitGarbageCollectWorker

See merge request gitlab-org/gitlab!61892
parents efd9b162 518af7f2
...@@ -2116,15 +2116,6 @@ ...@@ -2116,15 +2116,6 @@
:idempotent: true :idempotent: true
:tags: :tags:
- :exclude_from_kubernetes - :exclude_from_kubernetes
- :name: git_garbage_collect
:worker_name: GitGarbageCollectWorker
:feature_category: :gitaly
:has_external_dependencies:
:urgency: :low
:resource_boundary: :unknown
:weight: 1
:idempotent:
:tags: []
- :name: github_import_advance_stage - :name: github_import_advance_stage
:worker_name: Gitlab::GithubImport::AdvanceStageWorker :worker_name: Gitlab::GithubImport::AdvanceStageWorker
:feature_category: :importers :feature_category: :importers
......
# frozen_string_literal: true
# According to our docs, we can only remove workers on major releases
# https://docs.gitlab.com/ee/development/sidekiq_style_guide.html#removing-workers.
#
# We need to still maintain this until 14.0 but with the current functionality.
#
# In https://gitlab.com/gitlab-org/gitlab/-/issues/299290 we track that removal.
class GitGarbageCollectWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: false
feature_category :gitaly
loggable_arguments 1, 2, 3
def perform(project_id, task = :gc, lease_key = nil, lease_uuid = nil)
::Projects::GitGarbageCollectWorker.new.perform(project_id, task, lease_key, lease_uuid)
end
end
...@@ -152,8 +152,6 @@ ...@@ -152,8 +152,6 @@
- 1 - 1
- - geo - - geo
- 1 - 1
- - git_garbage_collect
- 1
- - github_import_advance_stage - - github_import_advance_stage
- 1 - 1
- - github_importer - - github_importer
......
# frozen_string_literal: true
require 'fileutils'
require 'spec_helper'
RSpec.describe GitGarbageCollectWorker do
let_it_be(:project) { create(:project, :repository) }
let(:lease_uuid) { SecureRandom.uuid }
let(:lease_key) { "project_housekeeping:#{project.id}" }
let(:task) { :full_repack }
let(:params) { [project.id, task, lease_key, lease_uuid] }
subject { described_class.new }
describe "#perform" do
it 'calls the Projects::GitGarbageGitGarbageCollectWorker with the same params' do
expect_next_instance_of(Projects::GitGarbageCollectWorker) do |instance|
expect(instance).to receive(:perform).with(*params)
end
subject.perform(*params)
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