Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2018-06-06 17:28:03 +0300
committerRobert Speicher <robert@gitlab.com>2018-06-06 17:28:03 +0300
commit005bc94447373a533b5258436012474142f1ef30 (patch)
tree33b7d2e1a43950c7c71e73c06286beed1338439e
parent41eab9a90787162ee338fd2e3a81827a9bc923c3 (diff)
parentcc9468e4fa276cef5673750464889f2d2791a9a2 (diff)
Merge branch 'gitaly-gc-repack-opt-out' into 'master'
Move GC/Repack to OptOut See merge request gitlab-org/gitlab-ce!19381
-rw-r--r--app/workers/git_garbage_collect_worker.rb6
-rw-r--r--spec/workers/git_garbage_collect_worker_spec.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/app/workers/git_garbage_collect_worker.rb b/app/workers/git_garbage_collect_worker.rb
index be4203bc7ad..f3c9e2b1582 100644
--- a/app/workers/git_garbage_collect_worker.rb
+++ b/app/workers/git_garbage_collect_worker.rb
@@ -29,7 +29,7 @@ class GitGarbageCollectWorker
task = task.to_sym
cmd = command(task)
- gitaly_migrate(GITALY_MIGRATED_TASKS[task]) do |is_enabled|
+ gitaly_migrate(GITALY_MIGRATED_TASKS[task], status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled|
if is_enabled
gitaly_call(task, project.repository.raw_repository)
else
@@ -114,8 +114,8 @@ class GitGarbageCollectWorker
%W[git -c repack.writeBitmaps=#{config_value}]
end
- def gitaly_migrate(method, &block)
- Gitlab::GitalyClient.migrate(method, &block)
+ def gitaly_migrate(method, status: Gitlab::GitalyClient::MigrationStatus::OPT_IN, &block)
+ Gitlab::GitalyClient.migrate(method, status: status, &block)
rescue GRPC::NotFound => e
Gitlab::GitLogger.error("#{method} failed:\nRepository not found")
raise Gitlab::Git::Repository::NoRepository.new(e)
diff --git a/spec/workers/git_garbage_collect_worker_spec.rb b/spec/workers/git_garbage_collect_worker_spec.rb
index 74539a7e493..f44b4edc305 100644
--- a/spec/workers/git_garbage_collect_worker_spec.rb
+++ b/spec/workers/git_garbage_collect_worker_spec.rb
@@ -104,7 +104,7 @@ describe GitGarbageCollectWorker do
it_should_behave_like 'flushing ref caches', true
end
- context "with Gitaly turned off", :skip_gitaly_mock do
+ context "with Gitaly turned off", :disable_gitaly do
it_should_behave_like 'flushing ref caches', false
end