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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
42e38b19
Commit
42e38b19
authored
Apr 29, 2021
by
Marius Bobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove feature flag for fronend Prometheus metrics
Remove feature flag for fronend Prometheus metrics
parent
1cdb4ed1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
54 deletions
+0
-54
app/services/ci/prometheus_metrics/observe_histograms_service.rb
...vices/ci/prometheus_metrics/observe_histograms_service.rb
+0
-6
config/feature_flags/development/ci_accept_frontend_prometheus_metrics.yml
...ags/development/ci_accept_frontend_prometheus_metrics.yml
+0
-8
spec/requests/projects/ci/promeheus_metrics/histograms_controller_spec.rb
...ojects/ci/promeheus_metrics/histograms_controller_spec.rb
+0
-14
spec/services/ci/prometheus_metrics/observe_histograms_service_spec.rb
.../ci/prometheus_metrics/observe_histograms_service_spec.rb
+0
-26
No files found.
app/services/ci/prometheus_metrics/observe_histograms_service.rb
View file @
42e38b19
...
...
@@ -25,8 +25,6 @@ module Ci
end
def
execute
return
ServiceResponse
.
success
(
http_status: :accepted
)
unless
enabled?
params
.
fetch
(
:histograms
,
[])
.
each
(
&
method
(
:observe
))
...
...
@@ -48,10 +46,6 @@ module Ci
.
fetch
(
name
)
{
raise
ActiveRecord
::
RecordNotFound
}
.
call
end
def
enabled?
::
Feature
.
enabled?
(
:ci_accept_frontend_prometheus_metrics
,
project
,
default_enabled: :yaml
)
end
end
end
end
config/feature_flags/development/ci_accept_frontend_prometheus_metrics.yml
deleted
100644 → 0
View file @
1cdb4ed1
---
name
:
ci_accept_frontend_prometheus_metrics
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/52820
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/300770
milestone
:
'
13.9'
type
:
development
group
:
group::pipeline authoring
default_enabled
:
false
spec/requests/projects/ci/promeheus_metrics/histograms_controller_spec.rb
View file @
42e38b19
...
...
@@ -24,20 +24,6 @@ RSpec.describe 'Projects::Ci::PrometheusMetrics::HistogramsController' do
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
end
context
'with the feature flag disabled'
do
before
do
stub_feature_flags
(
ci_accept_frontend_prometheus_metrics:
false
)
end
it
'returns 202 Accepted'
do
post
histograms_route
(
histograms:
[
{
name: :pipeline_graph_link_calculation_duration_seconds
,
value:
1
}
])
expect
(
response
).
to
have_gitlab_http_status
(
:accepted
)
end
end
end
def
histograms_route
(
params
=
{})
...
...
spec/services/ci/prometheus_metrics/observe_histograms_service_spec.rb
View file @
42e38b19
...
...
@@ -55,32 +55,6 @@ RSpec.describe Ci::PrometheusMetrics::ObserveHistogramsService do
end
end
context
'with feature flag disabled'
do
before
do
stub_feature_flags
(
ci_accept_frontend_prometheus_metrics:
false
)
end
let
(
:params
)
do
{
histograms:
[
{
name:
'pipeline_graph_link_calculation_duration_seconds'
,
value:
'4'
}
]
}
end
it
'does not register the metrics'
do
execute
expect
(
histogram_data
).
to
be_nil
end
it
'returns an empty body and status code'
do
is_expected
.
to
be_success
expect
(
subject
.
http_status
).
to
eq
(
:accepted
)
expect
(
subject
.
payload
).
to
eq
({})
end
end
def
histogram_data
(
name
=
:pipeline_graph_link_calculation_duration_seconds
)
Gitlab
::
Metrics
.
registry
.
get
(
name
)
&
.
get
({})
end
...
...
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