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
ec525e62
Commit
ec525e62
authored
Jan 11, 2022
by
Marius Bobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup pipeline logger feature flags
Changelog: other
parent
737ecf8b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
45 deletions
+2
-45
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+2
-12
config/feature_flags/development/ci_pipeline_logger_sql_count.yml
...eature_flags/development/ci_pipeline_logger_sql_count.yml
+0
-8
config/feature_flags/development/ci_pipeline_logger_tags_count.yml
...ature_flags/development/ci_pipeline_logger_tags_count.yml
+0
-8
lib/gitlab/ci/pipeline/logger.rb
lib/gitlab/ci/pipeline/logger.rb
+0
-8
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+0
-9
No files found.
app/models/ci/pipeline.rb
View file @
ec525e62
...
...
@@ -467,16 +467,12 @@ module Ci
end
def
tags_count
if
tag_counts_enabled?
ActsAsTaggableOn
::
Tagging
.
where
(
taggable:
builds
).
count
end
end
def
distinct_tags_count
if
tag_counts_enabled?
ActsAsTaggableOn
::
Tagging
.
where
(
taggable:
builds
).
count
(
'distinct(tag_id)'
)
end
end
def
stages_names
statuses
.
order
(
:stage_idx
).
distinct
...
...
@@ -1352,12 +1348,6 @@ module Ci
::
Gitlab
::
Ci
::
PipelineObjectHierarchy
.
new
(
self
.
class
.
unscoped
.
where
(
id:
id
),
options:
options
)
end
def
tag_counts_enabled?
strong_memoize
(
:tag_counts_enabled
)
do
::
Feature
.
enabled?
(
:ci_pipeline_logger_tags_count
,
project
,
default_enabled: :yaml
)
end
end
end
end
...
...
config/feature_flags/development/ci_pipeline_logger_sql_count.yml
deleted
100644 → 0
View file @
737ecf8b
---
name
:
ci_pipeline_logger_sql_count
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/77117
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/346246
milestone
:
'
14.7'
type
:
development
group
:
group::pipeline execution
default_enabled
:
false
config/feature_flags/development/ci_pipeline_logger_tags_count.yml
deleted
100644 → 0
View file @
737ecf8b
---
name
:
ci_pipeline_logger_tags_count
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/77112
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/348967
milestone
:
'
14.7'
type
:
development
group
:
group::pipeline execution
default_enabled
:
false
lib/gitlab/ci/pipeline/logger.rb
View file @
ec525e62
...
...
@@ -38,8 +38,6 @@ module Gitlab
end
def
instrument_with_sql
(
operation
,
&
block
)
return
instrument
(
operation
,
&
block
)
unless
sql_logging_enabled?
op_start_db_counters
=
current_db_counter_payload
result
=
instrument
(
operation
,
&
block
)
...
...
@@ -131,12 +129,6 @@ module Gitlab
def
current_db_counter_payload
::
Gitlab
::
Metrics
::
Subscribers
::
ActiveRecord
.
db_counter_payload
end
def
sql_logging_enabled?
strong_memoize
(
:sql_logging_enabled
)
do
::
Feature
.
enabled?
(
:ci_pipeline_logger_sql_count
,
project
,
default_enabled: :yaml
)
end
end
end
end
end
...
...
spec/models/ci/pipeline_spec.rb
View file @
ec525e62
...
...
@@ -4695,14 +4695,5 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do
it
{
expect
(
pipeline
.
tags_count
).
to
eq
(
4
)
}
it
{
expect
(
pipeline
.
distinct_tags_count
).
to
eq
(
3
)
}
end
context
'with the FF disabled'
do
before
do
stub_feature_flags
(
ci_pipeline_logger_tags_count:
false
)
end
it
{
expect
(
pipeline
.
tags_count
).
to
be_nil
}
it
{
expect
(
pipeline
.
distinct_tags_count
).
to
be_nil
}
end
end
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