Commit 26867b0e authored by Jan Provaznik's avatar Jan Provaznik

Merge branch 'remove-legacy-usage-data-keys' into 'master'

Remove legacy service count keys

See merge request gitlab-org/gitlab!35135
parents a12f2c47 1198169e
......@@ -513,8 +513,6 @@ appear to be associated to any of the services running, since they all appear to
| `projects_unify_circuit_active` | `counts` | | | | |
| `projects_webex_teams_active` | `counts` | | | | |
| `projects_youtrack_active` | `counts` | | | | |
| `projects_slack_notifications_active` | `counts` | | | | |
| `projects_slack_slash_active` | `counts` | | | | |
| `projects_jira_server_active` | `counts` | | | | |
| `projects_jira_cloud_active` | `counts` | | | | |
| `projects_jira_dvcs_cloud_active` | `counts` | | | | |
......
......@@ -347,15 +347,9 @@ module Gitlab
# rubocop: disable CodeReuse/ActiveRecord
def services_usage
results = Service.available_services_names.without('jira').each_with_object({}) do |service_name, response|
Service.available_services_names.without('jira').each_with_object({}) do |service_name, response|
response["projects_#{service_name}_active".to_sym] = count(Service.active.where(template: false, type: "#{service_name}_service".camelize))
end
# Keep old Slack keys for backward compatibility, https://gitlab.com/gitlab-data/analytics/issues/3241
results[:projects_slack_notifications_active] = results[:projects_slack_active]
results[:projects_slack_slash_active] = results[:projects_slack_slash_commands_active]
results.merge(jira_usage).merge(jira_import_usage)
end.merge(jira_usage).merge(jira_import_usage)
end
def jira_usage
......
......@@ -126,8 +126,6 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
expect(count_data[:jira_imports_projects_count]).to eq(2)
expect(count_data[:jira_imports_total_imported_count]).to eq(3)
expect(count_data[:jira_imports_total_imported_issues_count]).to eq(13)
expect(count_data[:projects_slack_notifications_active]).to eq(2)
expect(count_data[:projects_slack_slash_active]).to eq(1)
expect(count_data[:projects_slack_active]).to eq(2)
expect(count_data[:projects_slack_slash_commands_active]).to eq(1)
expect(count_data[:projects_custom_issue_tracker_active]).to eq(1)
......
......@@ -89,8 +89,6 @@ module UsageDataHelpers
projects_jira_active
projects_jira_server_active
projects_jira_cloud_active
projects_slack_notifications_active
projects_slack_slash_active
projects_slack_active
projects_slack_slash_commands_active
projects_custom_issue_tracker_active
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment