Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
be12f3ed
Commit
be12f3ed
authored
Dec 07, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update pipeline create chain Prometheus metric
parent
5ccced63
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
lib/gitlab/ci/pipeline/chain/create.rb
lib/gitlab/ci/pipeline/chain/create.rb
+3
-4
No files found.
lib/gitlab/ci/pipeline/chain/create.rb
View file @
be12f3ed
...
...
@@ -18,9 +18,7 @@ module Gitlab
rescue
ActiveRecord
::
RecordInvalid
=>
e
error
(
"Failed to persist the pipeline:
#{
e
}
"
)
ensure
pipeline
.
builds
.
find_each
do
|
build
|
next
if
build
.
stage_id
.
present?
if
pipeline
.
builds
.
where
(
stage_id:
nil
).
any?
invalid_builds_counter
.
increment
(
node:
hostname
)
end
end
...
...
@@ -33,7 +31,8 @@ module Gitlab
def
invalid_builds_counter
@counter
||=
Gitlab
::
Metrics
.
counter
(
:invalid_builds_counter
,
'Invalid builds counter'
)
.
counter
(
:gitlab_ci_invalid_builds_total
,
'Invalid builds without stage assigned counter'
)
end
def
hostname
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment