Draft: Remove all remaining metrics dashboard-related logic
What does this MR do and why?
Related issue: #461838 (closed)
I'm just deleting everything left and seeing what we get. I'll break this up smaller for easier review once I get a good look at the pipeline.
-
sy-rm-monitor-metrics-01
-
sy-rm-monitor-metrics-02
-
sy-rm-monitor-metrics-03
-
sy-rm-monitor-metrics-04
-
sy-rm-monitor-metrics-05
-
sy-rm-monitor-metrics-06
-
sy-rm-monitor-metrics-07
-
sy-rm-monitor-metrics-08
-
sy-rm-monitor-metrics-09
-
sy-rm-monitor-metrics-10
-
sy-rm-monitor-metrics-11
-
sy-rm-monitor-metrics-12
-
sy-rm-monitor-metrics-13
-
sy-rm-monitor-metrics-14
-
sy-rm-monitor-metrics-15
-
sy-rm-monitor-metrics-16
-
sy-rm-monitor-metrics-17
-
sy-rm-monitor-metrics-18
-
sy-rm-monitor-metrics-19
-
sy-rm-monitor-metrics-20
-
sy-rm-monitor-metrics-21
-
sy-rm-monitor-metrics-22
-
sy-rm-monitor-metrics-23
-
sy-rm-monitor-metrics-24
[remove alert models] -
sy-rm-monitor-metrics-25
-
sy-rm-monitor-metrics-26
[remove metric models] -
sy-rm-monitor-metrics-27
[remove metric tables] -
sy-rm-monitor-metrics-28
[remove prometheus alert association from alert] -
sy-rm-monitor-metrics-29
[drop alert_management_alerts foreign key] -
sy-rm-monitor-metrics-30
[remove read_prometheus_alert permission] -
sy-rm-monitor-metrics-31
[remove*_metrics_dashboard_annotation
permissions] -
sy-rm-monitor-metrics-32
[remove*_metrics_user_starred_dashboard
permissions] -
sy-rm-monitor-metrics-33
[remove annotations resolver] -
sy-rm-monitor-metrics-34
[remove starred dashboard docs] -
sy-rm-monitor-metrics-35
[remove annotations docs]
MR Breakdown plan/proposal (we'll see how it goes)
Clean up custom metrics feature -- sy-rm-monitor-metrics-01
- D -
app/assets/javascripts/custom_metrics/components/custom_metrics_form.vue
- D -
app/assets/javascripts/custom_metrics/components/custom_metrics_form_fields.vue
- D -
app/assets/javascripts/custom_metrics/components/delete_custom_metric_modal.vue
- D -
app/assets/javascripts/custom_metrics/constants.js
- D -
app/assets/javascripts/custom_metrics/index.js
- D -
app/assets/javascripts/pages/projects/prometheus/metrics/edit/index.js
- D -
app/assets/javascripts/pages/projects/prometheus/metrics/new/index.js
- D -
spec/frontend/custom_metrics/components/custom_metrics_form_fields_spec.js
- D -
spec/frontend/custom_metrics/components/custom_metrics_form_spec.js
Clean up custom metric views -- sy-rm-monitor-metrics-02
- D -
app/views/projects/prometheus/metrics/_form.html.haml
- D -
app/views/projects/prometheus/metrics/edit.html.haml
- D -
app/views/projects/prometheus/metrics/new.html.haml
Clean up prometheus metrics from integration views -- sy-rm-monitor-metrics-03
- M -
app/assets/javascripts/pages/admin/integrations/edit/index.js
- M -
app/assets/javascripts/pages/groups/settings/integrations/edit/index.js
- M -
app/assets/javascripts/pages/projects/settings/integrations/edit/index.js
- D -
app/assets/javascripts/prometheus_metrics/constants.js
- D -
app/assets/javascripts/prometheus_metrics/prometheus_metrics.js
- D -
app/assets/javascripts/prometheus_metrics/custom_metrics.js
- D -
spec/frontend/prometheus_metrics/custom_metrics_spec.js
- D -
spec/frontend/prometheus_metrics/mock_data.js
- D -
spec/frontend/prometheus_metrics/prometheus_metrics_spec.js
Remove unused metrics dashboard fixtures -- sy-rm-monitor-metrics-04
- D -
spec/fixtures/lib/gitlab/metrics/dashboard/*
Remove unused metrics dashboard templates -- sy-rm-monitor-metrics-05
- D -
lib/gitlab/metrics/templates/*
Clean up metrics dashboard methods from cluster presenters -- sy-rm-monitor-metrics-06
- M -
app/presenters/clusters/cluster_presenter.rb
- M -
app/presenters/group_clusterable_presenter.rb
- M -
app/presenters/instance_clusterable_presenter.rb
- M -
app/presenters/project_clusterable_presenter.rb
- M -
spec/presenters/clusters/cluster_presenter_spec.rb
- M -
spec/presenters/group_clusterable_presenter_spec.rb
- M -
spec/presenters/instance_clusterable_presenter_spec.rb
- M -
spec/presenters/project_clusterable_presenter_spec.rb
- M -
app/presenters/clusterable_presenter.rb
Clean up metrics dashboard features from rest api -- sy-rm-monitor-metrics-07
- M -
lib/api/api.rb
- D -
lib/api/entities/metrics/dashboard/annotation.rb
- D -
lib/api/entities/metrics/user_starred_dashboard.rb
- D -
lib/api/metrics/dashboard/annotations.rb
- D -
lib/api/metrics/user_starred_dashboards.rb
- D -
spec/requests/api/metrics/dashboard/annotations_spec.rb
- D -
spec/requests/api/metrics/user_starred_dashboards_spec.rb
Remove references to unused prometheus alert reference on incoming alerts -- sy-rm-monitor-metrics-08
- M -
lib/gitlab/alert_management/payload/base.rb
- M -
spec/lib/gitlab/alert_management/payload/base_spec.rb
Stop including prometheus alerts in service ping -- sy-rm-monitor-metrics-09
- D -
lib/gitlab/usage/metrics/instrumentations/issues_created_from_alerts_metric.rb
- D -
lib/gitlab/usage/metrics/instrumentations/issues_with_prometheus_alert_events.rb
- M -
lib/gitlab/usage/metrics/instrumentations/issues_with_alert_management_alerts_metric.rb
- M -
lib/gitlab/usage_data.rb
- M -
ee/spec/lib/ee/gitlab/usage_data_spec.rb
- M -
spec/factories/usage_data.rb
- M -
config/metrics/counts_all/20210216180441_issues_created_from_alerts.yml
Remove reference to prometheus metrics from firing alert emails -- sy-rm-monitor-metrics-10
- M -
app/views/notify/prometheus_alert_fired_email.html.haml
- M -
app/views/notify/prometheus_alert_fired_email.text.erb
- M -
spec/mailers/emails/projects_spec.rb
Remove unused metrics dashboard shared examples -- sy-rm-monitor-metrics-11
- D -
spec/support/shared_examples/metrics/url_shared_examples.rb
- M -
spec/support/shared_contexts/prometheus/alert_shared_context.rb
Remove unused metrics dashboard annotation policy -- sy-rm-monitor-metrics-12
- D -
app/policies/metrics/dashboard/annotation_policy.rb
Remove views for Integrations > Prometheus -- sy-rm-monitor-metrics-13
- D -
app/views/shared/integrations/prometheus/_custom_metrics.html.haml
- D -
app/views/shared/integrations/prometheus/_help.html.haml
- D -
app/views/shared/integrations/prometheus/_metrics.html.haml
- D -
app/views/shared/integrations/prometheus/_show.html.haml
- D -
app/views/shared/_prometheus_configuration_banner.html.haml
- D -
spec/frontend/fixtures/prometheus_integration.rb
- D -
app/helpers/custom_metrics_helper.rb
Remove unused metrics dashboard helpers -- sy-rm-monitor-metrics-14
- D -
spec/support/helpers/metrics_dashboard_helpers.rb
Remove metrics seeding rake task (feature removed) -- sy-rm-monitor-metrics-15
- D -
ee/lib/tasks/gitlab/seed/metrics.rake
- M -
doc/administration/raketasks/maintenance.md
- M -
doc/development/prometheus_metrics.md
Remove unused prometheus alerts/metrics finders -- sy-rm-monitor-metrics-16
- D -
app/finders/projects/prometheus/alerts_finder.rb
- D -
app/finders/prometheus_metrics_finder.rb
- D -
spec/finders/projects/prometheus/alerts_finder_spec.rb
- D -
spec/finders/prometheus_metrics_finder_spec.rb
Stop using presenter for prometheus alerts -- sy-rm-monitor-metrics-17
- D -
app/presenters/prometheus_alert_presenter.rb
- D -
spec/presenters/prometheus_alert_presenter_spec.rb
- M -
app/graphql/types/prometheus_alert_type.rb
Remove unused prometheus metric entity/serializer -- sy-rm-monitor-metrics-18
- D -
app/serializers/prometheus_metric_entity.rb
- D -
app/serializers/prometheus_metric_serializer.rb
Remove unused prometheus metric service -- sy-rm-monitor-metrics-19
- D -
app/services/projects/prometheus/metrics/base_service.rb
- D -
app/services/projects/prometheus/metrics/destroy_service.rb
- D -
spec/services/projects/prometheus/metrics/destroy_service_spec.rb
Remove unused metrics environment helpers -- sy-rm-monitor-metrics-20
- M -
app/helpers/environments_helper.rb
- M -
spec/helpers/environments_helper_spec.rb
Stop creating extra prometheus alert records from operations dashboard specs -- sy-rm-monitor-metrics-21
- M -
ee/spec/services/dashboard/operations/list_service_spec.rb
Swap environment alerts not to rely on prometheus -- sy-rm-monitor-metrics-22
- M -
app/models/alert_management/alert.rb
- M -
app/models/environment.rb
- M -
ee/spec/features/projects/environments/environments_spec.rb
- M -
ee/spec/serializers/ee/environment_serializer_spec.rb
- M -
ee/spec/serializers/environment_entity_spec.rb
- M -
spec/graphql/types/environment_type_spec.rb
- M -
spec/models/alert_management/alert_spec.rb
Clean up associations -- sy-rm-monitor-metrics-23
- M -
app/models/issue.rb
- M -
app/models/environment.rb
- M -
app/models/project.rb
- M -
app/models/alert_management/alert.rb
- M -
app/presenters/alert_management/alert_presenter.rb
- M -
spec/models/alert_management/alert_spec.rb
Remove models (blocked by a bunch of above MRs; probably needs more breakdown but is more intertwined
- D -
app/models/concerns/alert_event_lifecycle.rb
- D -
app/models/concerns/enums/prometheus_metric.rb
- D -
app/models/prometheus_alert.rb
- D -
app/models/prometheus_alert_event.rb
- D -
app/models/prometheus_metric.rb
- D -
spec/factories/prometheus_alert.rb
- D -
spec/factories/prometheus_alert_event.rb
- D -
spec/factories/prometheus_metrics.rb
- D -
spec/models/prometheus_alert_event_spec.rb
- D -
spec/models/prometheus_alert_spec.rb
- D -
spec/models/prometheus_metric_spec.rb
- M -
spec/support/shared_examples/lint_factories_shared_examples.rb
- M -
app/models/alert_management/alert.rb
- M -
ee/spec/controllers/operations_controller_spec.rb
- M -
lib/gitlab/import_export/project/import_export.yml
- M -
spec/db/schema_spec.rb
- M -
spec/lib/gitlab/import_export/all_models.yml
- M -
spec/lib/gitlab/import_export/attributes_permitter_spec.rb
- M -
spec/lib/gitlab/import_export/import_test_coverage_spec.rb
- M -
spec/lib/gitlab/import_export/safe_model_attributes.yml
- M -
spec/models/alert_management/alert_spec.rb
- M -
spec/models/issue_spec.rb
- M -
spec/models/project_spec.rb
As needed with above MRs
- M -
locale/gitlab.pot
- M -
spec/support/rspec_order_todo.yml
- M -
doc/api/graphql/reference/index.md
- M -
.rubocop_todo/database/avoid_using_pluck_without_limit.yml
- M -
.rubocop_todo/gitlab/bounded_contexts.yml
- M -
.rubocop_todo/gitlab/namespaced_class.yml
- M -
.rubocop_todo/layout/line_continuation_spacing.yml
- M -
.rubocop_todo/layout/line_end_string_concatenation_indentation.yml
- M -
.rubocop_todo/layout/line_length.yml
- M -
.rubocop_todo/rails/file_path.yml
- M -
.rubocop_todo/rspec/any_instance_of.yml
- M -
.rubocop_todo/rspec/before_all_role_assignment.yml
- M -
.rubocop_todo/rspec/context_wording.yml
- M -
.rubocop_todo/rspec/factory_bot/avoid_create.yml
- M -
.rubocop_todo/rspec/feature_category.yml
- M -
.rubocop_todo/rspec/named_subject.yml
- M -
.rubocop_todo/style/inline_disable_annotation.yml
- M -
.rubocop_todo/style/redundant_self.yml
- M -
.rubocop_todo/style/string_concatenation.yml
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.