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:
authorShinya Maeda <shinya@gitlab.com>2018-10-25 07:56:51 +0300
committerShinya Maeda <shinya@gitlab.com>2018-10-30 07:42:13 +0300
commit673855b12b0eb2de8672f7c7048e05f31adc8ca6 (patch)
tree5d4cae2bf6006d8302eb24985555d3e0da377968
parentdb2d9c886ca1177b8118896fa3b9b278d4705539 (diff)
Fix static analysys
-rw-r--r--app/workers/build_success_worker.rb2
-rw-r--r--db/migrate/20181022135539_add_partial_index_to_successful_deployments.rb2
-rw-r--r--lib/gitlab/ci/pipeline/chain/create.rb2
3 files changed, 1 insertions, 5 deletions
diff --git a/app/workers/build_success_worker.rb b/app/workers/build_success_worker.rb
index 8b174e3fb10..65d9c637c7d 100644
--- a/app/workers/build_success_worker.rb
+++ b/app/workers/build_success_worker.rb
@@ -6,9 +6,7 @@ class BuildSuccessWorker
queue_namespace :pipeline_processing
- # rubocop: disable CodeReuse/ActiveRecord
def perform(build_id)
# no-op
end
- # rubocop: enable CodeReuse/ActiveRecord
end
diff --git a/db/migrate/20181022135539_add_partial_index_to_successful_deployments.rb b/db/migrate/20181022135539_add_partial_index_to_successful_deployments.rb
index d3ce28fc49e..49d8c303150 100644
--- a/db/migrate/20181022135539_add_partial_index_to_successful_deployments.rb
+++ b/db/migrate/20181022135539_add_partial_index_to_successful_deployments.rb
@@ -9,7 +9,7 @@ class AddPartialIndexToSuccessfulDeployments < ActiveRecord::Migration
disable_ddl_transaction!
def up
- add_concurrent_index(:deployments, ['environment_id', 'id'], where: "status = 2 OR status IS NULL", name: INDEX_NAME)
+ add_concurrent_index(:deployments, %w[environment_id id], where: "status = 2 OR status IS NULL", name: INDEX_NAME)
end
def down
diff --git a/lib/gitlab/ci/pipeline/chain/create.rb b/lib/gitlab/ci/pipeline/chain/create.rb
index 5c2523b83fe..fd23ce71be3 100644
--- a/lib/gitlab/ci/pipeline/chain/create.rb
+++ b/lib/gitlab/ci/pipeline/chain/create.rb
@@ -5,13 +5,11 @@ module Gitlab
class Create < Chain::Base
include Chain::Helpers
- # rubocop: disable CodeReuse/ActiveRecord
def perform!
pipeline.save!
rescue ActiveRecord::RecordInvalid => e
error("Failed to persist the pipeline: #{e}")
end
- # rubocop: enable CodeReuse/ActiveRecord
def break?
!pipeline.persisted?