Skip to content
代码片段 群组 项目
未验证 提交 7f85033e 编辑于 作者: Adam Hegyi's avatar Adam Hegyi 提交者: GitLab
浏览文件

Remove CH analytics related feature flags

Remove CH analytics related feature flags

Changelog: removed
EE: true
上级 0108e9ea
No related branches found
No related tags found
1 合并请求!2419Fix TanukiBot spec relying on outdated code
显示
6 个添加94 个删除
......@@ -66,7 +66,7 @@ def click_house_each_batch
end
def enabled?
Gitlab::ClickHouse.globally_enabled_for_analytics? && Feature.enabled?(:event_sync_worker_for_click_house)
Gitlab::ClickHouse.globally_enabled_for_analytics?
end
def runtime_limiter
......
---
name: clickhouse_data_collection
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127435
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/420257
milestone: '16.3'
type: development
group: group::optimize
default_enabled: false
---
name: event_sync_worker_for_click_house
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128628
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/421184
milestone: '16.3'
type: development
group: group::optimize
default_enabled: false
......@@ -11,6 +11,7 @@ DETAILS:
**Offering:** GitLab.com, Self-managed
> - ClickHouse data collector [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/414610) in GitLab 16.3 [with a flag](../administration/feature_flags.md) named `clickhouse_data_collection`. Disabled by default.
> - Feature flag `clickhouse_data_collection` removed in GitLab 17.0 and replaced with an application setting.
The [contribution analytics](../user/group/contribution_analytics/index.md) report and [Value Streams Dashboard](../user/analytics/value_streams_dashboard.md#dashboard-metrics-and-drill-down-reports) contributors count metric can use ClickHouse as a data source.
......
......@@ -65,7 +65,7 @@ The sparkline color ranges from blue to green, where green indicates a positive
Sparklines help you identify patterns in metric trends (such as seasonal changes) over time.
NOTE:
The contributor count metric is available only on GitLab.com at the group-level. To view this metric in the comparison panel, you must [set up ClickHouse](../../integration/clickhouse.md), and enable the [feature flags](../../administration/feature_flags.md) `clickhouse_data_collection` and `event_sync_worker_for_click_house`.
The contributor count metric is available only on GitLab.com at the group-level. To view this metric in the comparison panel, you must [set up ClickHouse](../../integration/clickhouse.md).
### DORA Performers score panel
......
......@@ -55,9 +55,7 @@ def model_class
end
def enabled?
super &&
Gitlab::ClickHouse.globally_enabled_for_analytics? &&
Feature.enabled?(:event_sync_worker_for_click_house)
super && Gitlab::ClickHouse.globally_enabled_for_analytics?
end
end
end
......
- return unless Feature.enabled?(:clickhouse_data_collection)
- expanded = integration_expanded?('use_clickhouse_')
%section.settings.no-animate#js-analytics-settings{ class: ('expanded' if expanded) }
......
......@@ -64,8 +64,6 @@ def sync_to_click_house
Gitlab::Seeder.quiet do
feature_available = ::Gitlab::ClickHouse.globally_enabled_for_analytics? &&
Feature.enabled?(:clickhouse_data_collection) &&
Feature.enabled?(:event_sync_worker_for_click_house) &&
Feature.enabled?(:code_suggestion_events_in_click_house)
unless feature_available
......@@ -80,8 +78,6 @@ def sync_to_click_house
Gitlab::CurrentSettings.current_application_settings.update(use_clickhouse_for_analytics: true)
Feature.enable(:clickhouse_data_collection)
Feature.enable(:event_sync_worker_for_click_house)
Feature.enable(:code_suggestion_events_in_click_house)
"
break
......
......@@ -6,8 +6,8 @@ module ClickHouse
extend ActiveSupport::Concern
class_methods do
def enabled_for_analytics?(group = nil)
globally_enabled_for_analytics? && ::Feature.enabled?(:clickhouse_data_collection, group)
def enabled_for_analytics?(_group = nil)
globally_enabled_for_analytics?
end
def globally_enabled_for_analytics?
......
......@@ -585,7 +585,6 @@
describe 'Analytics reports settings', feature_category: :value_stream_management do
before do
stub_feature_flags(clickhouse_data_collection: true)
allow(Gitlab::ClickHouse).to receive(:configured?).and_return(true)
end
......@@ -613,18 +612,6 @@
end
end
end
context 'when clickhouse_data_collection feature flag is disabled' do
before do
stub_feature_flags(clickhouse_data_collection: false)
end
it 'does not render analytics section' do
visit general_admin_application_settings_path
expect(page).not_to have_selector('#js-analytics-settings')
end
end
end
def current_settings
......
......@@ -4,10 +4,6 @@
RSpec.describe Gitlab::ClickHouse, feature_category: :database do
describe '.enabled_for_analytics?' do
before do
stub_feature_flags(clickhouse_data_collection: true)
end
context 'when ClickHouse is configured' do
before do
allow(described_class).to receive(:configured?).and_return(true)
......@@ -21,14 +17,6 @@
end
it { is_expected.to be_enabled_for_analytics }
context 'and clickhouse_data_collection feature flag is disabled ' do
before do
stub_feature_flags(clickhouse_data_collection: false)
end
it { is_expected.not_to be_enabled_for_analytics }
end
end
end
......
......@@ -63,7 +63,6 @@
end
describe 'data retrieval' do
# clickhouse_data_collection is disabled by default, but enabled for this annotation
context 'when ClickHouse is enabled for analytics', :click_house do
before do
allow(::Gitlab::ClickHouse).to receive(:enabled_for_analytics?).and_return(true)
......
......@@ -116,7 +116,6 @@
context 'when the clickhouse database is configured the feature flag is enabled' do
before do
allow(Gitlab::ClickHouse).to receive(:configured?).and_return(true)
stub_feature_flags(event_sync_worker_for_click_house: true)
end
it 'returns true' do
......@@ -133,17 +132,6 @@
expect(strategy.send(:enabled?)).to be_falsey
end
end
context 'when the feature flag is disabled' do
before do
allow(Gitlab::ClickHouse).to receive(:configured?).and_return(true)
stub_feature_flags(event_sync_worker_for_click_house: false)
end
it 'returns false' do
expect(strategy.send(:enabled?)).to be_falsey
end
end
end
end
end
......@@ -32,17 +32,6 @@
end
end
context 'when the event_sync_worker_for_click_house feature flag is off' do
it 'does nothing' do
allow(Gitlab::ClickHouse).to receive(:configured?).and_return(true)
stub_feature_flags(event_sync_worker_for_click_house: false)
expect(worker).not_to receive(:log_extra_metadata_on_done)
worker.perform
end
end
context 'when ClickHouse is available', :click_house do
let_it_be(:connection) { ClickHouse::Connection.new(:main) }
let_it_be_with_reload(:user1) { create(:user) }
......
......@@ -32,20 +32,6 @@
end
end
context 'when the event_sync_worker_for_click_house feature flag is off' do
before do
stub_feature_flags(event_sync_worker_for_click_house: false)
end
it 'does nothing' do
allow(ClickHouse::Client).to receive(:database_configured?).and_return(true)
expect(worker).not_to receive(:log_extra_metadata_on_done)
worker.perform
end
end
context 'when ClickHouse is available', :click_house do
let_it_be(:connection) { ClickHouse::Connection.new(:main) }
let_it_be_with_reload(:namespace1) { create(:group) }
......
......@@ -319,9 +319,6 @@
# Keep-around refs should only be turned off for specific projects/repositories.
stub_feature_flags(disable_keep_around_refs: false)
# Postgres is the primary data source, and ClickHouse only when enabled in certain cases.
stub_feature_flags(clickhouse_data_collection: false)
# The Vue version of the merge request list app is missing a lot of information
# disabling this for now whilst we work on it across multiple merge requests
stub_feature_flags(vue_merge_request_list: false)
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册