Commit 1f424855 authored by Michael Kozono's avatar Michael Kozono

Merge branch '340847-remove-deprecated-metric-status-6' into 'master'

Remove deprecated package metrics

See merge request gitlab-org/gitlab!76710
parents 42f9b7b2 0e95d709
...@@ -8,7 +8,7 @@ product_stage: package ...@@ -8,7 +8,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: container registry product_category: container registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -8,7 +8,7 @@ product_stage: package ...@@ -8,7 +8,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -8,7 +8,7 @@ product_stage: package ...@@ -8,7 +8,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -8,7 +8,7 @@ product_stage: package ...@@ -8,7 +8,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -8,7 +8,7 @@ product_stage: package ...@@ -8,7 +8,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: container registry product_category: container registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -8,7 +8,7 @@ product_stage: package ...@@ -8,7 +8,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -7,7 +7,7 @@ product_stage: package ...@@ -7,7 +7,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -7,7 +7,7 @@ product_stage: package ...@@ -7,7 +7,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -8,7 +8,7 @@ product_stage: package ...@@ -8,7 +8,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: container registry product_category: container registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -8,7 +8,7 @@ product_stage: package ...@@ -8,7 +8,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -8,7 +8,7 @@ product_stage: package ...@@ -8,7 +8,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -8,7 +8,7 @@ product_stage: package ...@@ -8,7 +8,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -8,7 +8,7 @@ product_stage: package ...@@ -8,7 +8,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: container registry product_category: container registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -7,7 +7,7 @@ product_stage: package ...@@ -7,7 +7,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -7,7 +7,7 @@ product_stage: package ...@@ -7,7 +7,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -8,7 +8,7 @@ product_stage: package ...@@ -8,7 +8,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric instrumentation_class: RedisHLLMetric
......
...@@ -7,7 +7,7 @@ product_stage: package ...@@ -7,7 +7,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: all time_frame: all
data_source: redis data_source: redis
distribution: distribution:
......
...@@ -7,7 +7,7 @@ product_stage: package ...@@ -7,7 +7,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: all time_frame: all
data_source: redis data_source: redis
distribution: distribution:
......
...@@ -7,7 +7,7 @@ product_stage: package ...@@ -7,7 +7,7 @@ product_stage: package
product_group: group::package product_group: group::package
product_category: package registry product_category: package registry
value_type: number value_type: number
status: deprecated status: removed
time_frame: all time_frame: all
data_source: redis data_source: redis
distribution: distribution:
......
...@@ -12,10 +12,6 @@ RSpec.describe 'Every metric definition' do ...@@ -12,10 +12,6 @@ RSpec.describe 'Every metric definition' do
license_add_ons license_add_ons
testing_total_unique_counts testing_total_unique_counts
user_auth_by_provider user_auth_by_provider
package_events_i_package_container_push_package
package_events_i_package_container_pull_package
package_events_i_package_debian_push_package
package_events_i_package_container_delete_package
).freeze ).freeze
end end
......
...@@ -83,7 +83,6 @@ module API ...@@ -83,7 +83,6 @@ module API
::Packages::Debian::ProcessChangesWorker.perform_async(package_file.id, current_user.id) # rubocop:disable CodeReuse/Worker ::Packages::Debian::ProcessChangesWorker.perform_async(package_file.id, current_user.id) # rubocop:disable CodeReuse/Worker
end end
track_package_event('push_package', :debian, user: current_user, project: authorized_user_project, namespace: authorized_user_project.namespace)
created! created!
rescue ObjectStorage::RemoteStoreError => e rescue ObjectStorage::RemoteStoreError => e
Gitlab::ErrorTracking.track_exception(e, extra: { file_name: params[:file_name], project_id: authorized_user_project.id }) Gitlab::ErrorTracking.track_exception(e, extra: { file_name: params[:file_name], project_id: authorized_user_project.id })
......
...@@ -5,12 +5,8 @@ ...@@ -5,12 +5,8 @@
- i_package_conan_delete_package - i_package_conan_delete_package
- i_package_conan_pull_package - i_package_conan_pull_package
- i_package_conan_push_package - i_package_conan_push_package
- i_package_container_delete_package
- i_package_container_pull_package
- i_package_container_push_package
- i_package_debian_delete_package - i_package_debian_delete_package
- i_package_debian_pull_package - i_package_debian_pull_package
- i_package_debian_push_package
- i_package_delete_package - i_package_delete_package
- i_package_delete_package_by_deploy_token - i_package_delete_package_by_deploy_token
- i_package_delete_package_by_guest - i_package_delete_package_by_guest
...@@ -56,9 +52,6 @@ ...@@ -56,9 +52,6 @@
- i_package_rubygems_delete_package - i_package_rubygems_delete_package
- i_package_rubygems_pull_package - i_package_rubygems_pull_package
- i_package_rubygems_push_package - i_package_rubygems_push_package
- i_package_tag_delete_package
- i_package_tag_pull_package
- i_package_tag_push_package
- i_package_terraform_module_delete_package - i_package_terraform_module_delete_package
- i_package_terraform_module_pull_package - i_package_terraform_module_pull_package
- i_package_terraform_module_push_package - i_package_terraform_module_push_package
...@@ -15,22 +15,6 @@ ...@@ -15,22 +15,6 @@
category: user_packages category: user_packages
aggregation: weekly aggregation: weekly
redis_slot: package redis_slot: package
- name: i_package_container_deploy_token
category: deploy_token_packages
aggregation: weekly
redis_slot: package
- name: i_package_container_user
category: user_packages
aggregation: weekly
redis_slot: package
- name: i_package_debian_deploy_token
category: deploy_token_packages
aggregation: weekly
redis_slot: package
- name: i_package_debian_user
category: user_packages
aggregation: weekly
redis_slot: package
- name: i_package_generic_deploy_token - name: i_package_generic_deploy_token
category: deploy_token_packages category: deploy_token_packages
aggregation: weekly aggregation: weekly
...@@ -39,14 +23,6 @@ ...@@ -39,14 +23,6 @@
category: user_packages category: user_packages
aggregation: weekly aggregation: weekly
redis_slot: package redis_slot: package
- name: i_package_golang_deploy_token
category: deploy_token_packages
aggregation: weekly
redis_slot: package
- name: i_package_golang_user
category: user_packages
aggregation: weekly
redis_slot: package
- name: i_package_helm_deploy_token - name: i_package_helm_deploy_token
category: deploy_token_packages category: deploy_token_packages
aggregation: weekly aggregation: weekly
...@@ -95,14 +71,6 @@ ...@@ -95,14 +71,6 @@
category: user_packages category: user_packages
aggregation: weekly aggregation: weekly
redis_slot: package redis_slot: package
- name: i_package_tag_deploy_token
category: deploy_token_packages
aggregation: weekly
redis_slot: package
- name: i_package_tag_user
category: user_packages
aggregation: weekly
redis_slot: package
- name: i_package_terraform_module_deploy_token - name: i_package_terraform_module_deploy_token
category: deploy_token_packages category: deploy_token_packages
aggregation: weekly aggregation: weekly
......
...@@ -13,10 +13,6 @@ RSpec.describe Gitlab::UsageDataCounters::PackageEventCounter, :clean_gitlab_red ...@@ -13,10 +13,6 @@ RSpec.describe Gitlab::UsageDataCounters::PackageEventCounter, :clean_gitlab_red
end end
end end
it 'includes the right events' do
expect(described_class::KNOWN_EVENTS.size).to eq 63
end
described_class::KNOWN_EVENTS.each do |event| described_class::KNOWN_EVENTS.each do |event|
it_behaves_like 'usage counter with totals', event it_behaves_like 'usage counter with totals', event
end end
...@@ -24,8 +20,8 @@ RSpec.describe Gitlab::UsageDataCounters::PackageEventCounter, :clean_gitlab_red ...@@ -24,8 +20,8 @@ RSpec.describe Gitlab::UsageDataCounters::PackageEventCounter, :clean_gitlab_red
describe '.fetch_supported_event' do describe '.fetch_supported_event' do
subject { described_class.fetch_supported_event(event_name) } subject { described_class.fetch_supported_event(event_name) }
let(:event_name) { 'package_events_i_package_composer_push_package' } let(:event_name) { 'package_events_i_package_conan_push_package' }
it { is_expected.to eq 'i_package_composer_push_package' } it { is_expected.to eq 'i_package_conan_push_package' }
end end
end end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe Packages::CreateEventService do RSpec.describe Packages::CreateEventService do
let(:scope) { 'container' } let(:scope) { 'generic' }
let(:event_name) { 'push_package' } let(:event_name) { 'push_package' }
let(:params) do let(:params) do
...@@ -75,24 +75,24 @@ RSpec.describe Packages::CreateEventService do ...@@ -75,24 +75,24 @@ RSpec.describe Packages::CreateEventService do
context 'with a user' do context 'with a user' do
let(:user) { create(:user) } let(:user) { create(:user) }
it_behaves_like 'db package event creation', 'user', 'container' it_behaves_like 'db package event creation', 'user', 'generic'
it_behaves_like 'redis package unique event creation', 'user', 'container' it_behaves_like 'redis package unique event creation', 'user', 'generic'
it_behaves_like 'redis package count event creation', 'user', 'container' it_behaves_like 'redis package count event creation', 'user', 'generic'
end end
context 'with a deploy token' do context 'with a deploy token' do
let(:user) { create(:deploy_token) } let(:user) { create(:deploy_token) }
it_behaves_like 'db package event creation', 'deploy_token', 'container' it_behaves_like 'db package event creation', 'deploy_token', 'generic'
it_behaves_like 'redis package unique event creation', 'deploy_token', 'container' it_behaves_like 'redis package unique event creation', 'deploy_token', 'generic'
it_behaves_like 'redis package count event creation', 'deploy_token', 'container' it_behaves_like 'redis package count event creation', 'deploy_token', 'generic'
end end
context 'with no user' do context 'with no user' do
let(:user) { nil } let(:user) { nil }
it_behaves_like 'db package event creation', 'guest', 'container' it_behaves_like 'db package event creation', 'guest', 'generic'
it_behaves_like 'redis package count event creation', 'guest', 'container' it_behaves_like 'redis package count event creation', 'guest', 'generic'
end end
context 'with a package as scope' do context 'with a package as scope' do
......
...@@ -40,7 +40,6 @@ RSpec.shared_examples 'Debian packages upload request' do |status, body = nil| ...@@ -40,7 +40,6 @@ RSpec.shared_examples 'Debian packages upload request' do |status, body = nil|
expect(response.body).to match(body) expect(response.body).to match(body)
end end
end end
it_behaves_like 'a package tracking event', described_class.name, 'push_package'
else else
it "returns #{status}#{and_body}", :aggregate_failures do it "returns #{status}#{and_body}", :aggregate_failures do
subject subject
......
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