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
0d09d655
Commit
0d09d655
authored
Feb 10, 2021
by
Mikolaj Wawrzyniak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use default_enabled: :yaml in aggregated metrics
parent
6009b61a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
lib/gitlab/usage/metrics/aggregates/aggregate.rb
lib/gitlab/usage/metrics/aggregates/aggregate.rb
+1
-1
spec/lib/gitlab/usage/metrics/aggregates/aggregate_spec.rb
spec/lib/gitlab/usage/metrics/aggregates/aggregate_spec.rb
+1
-0
No files found.
lib/gitlab/usage/metrics/aggregates/aggregate.rb
View file @
0d09d655
...
...
@@ -44,7 +44,7 @@ module Gitlab
def
aggregated_metrics_data
(
start_date
:,
end_date
:)
aggregated_metrics
.
each_with_object
({})
do
|
aggregation
,
data
|
next
if
aggregation
[
:feature_flag
]
&&
Feature
.
disabled?
(
aggregation
[
:feature_flag
],
default_enabled:
false
,
type: :development
)
next
if
aggregation
[
:feature_flag
]
&&
Feature
.
disabled?
(
aggregation
[
:feature_flag
],
default_enabled:
:yaml
,
type: :development
)
case
aggregation
[
:source
]
when
REDIS_SOURCE
...
...
spec/lib/gitlab/usage/metrics/aggregates/aggregate_spec.rb
View file @
0d09d655
...
...
@@ -142,6 +142,7 @@ RSpec.describe Gitlab::Usage::Metrics::Aggregates::Aggregate, :clean_gitlab_redi
it
'does not calculate data for aggregates with ff turned off'
do
skip_feature_flags_yaml_validation
skip_default_enabled_yaml_check
stub_feature_flags
(
enabled_feature_flag
=>
true
,
disabled_feature_flag
=>
false
)
allow
(
sources
::
RedisHll
).
to
receive
(
:calculate_metrics_union
).
and_return
(
6
)
...
...
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