summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-03-05 08:54:58 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2018-03-05 08:54:58 +0000
commitc6764bdc2abcc8c63d4018fe2471af1f50e37df9 (patch)
treeb577f0bc31ea8a152cdc051c7e1c1ef685460bda
parent8a0052c037f025b64159ca8cfe0d3451261c1edb (diff)
parent29d87db896a6f67f72679694c3d481eff4275a18 (diff)
downloadgitlab-ce-c6764bdc2abcc8c63d4018fe2471af1f50e37df9.tar.gz
Merge branch 'fix/gb/remove-unused-pipelines-prometheus-metric' into 'master'
Remove unsued pipelines-related prometheus metric See merge request gitlab-org/gitlab-ce!17515
-rw-r--r--lib/gitlab/ci/pipeline/chain/create.rb16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/gitlab/ci/pipeline/chain/create.rb b/lib/gitlab/ci/pipeline/chain/create.rb
index d19a2519803..d5e17a123df 100644
--- a/lib/gitlab/ci/pipeline/chain/create.rb
+++ b/lib/gitlab/ci/pipeline/chain/create.rb
@@ -17,27 +17,11 @@ module Gitlab
end
rescue ActiveRecord::RecordInvalid => e
error("Failed to persist the pipeline: #{e}")
- ensure
- if pipeline.builds.where(stage_id: nil).any?
- invalid_builds_counter.increment(node: hostname)
- end
end
def break?
!pipeline.persisted?
end
-
- private
-
- def invalid_builds_counter
- @counter ||= Gitlab::Metrics
- .counter(:gitlab_ci_invalid_builds_total,
- 'Invalid builds without stage assigned counter')
- end
-
- def hostname
- @hostname ||= Socket.gethostname
- end
end
end
end