Metrics: Delete GFM pipeline logic for embeds
Overview
⚠ Removal should take place during %16.0 or later.
⚠ Category:Metrics code is intertwined with the metrics GitLab reports on itself. Only Category:Metrics should be removed. Similarly, some items named likePrometheusAlert
are also used forAlertManagement::Alert
and should not be removed.
As part of Monitor: Metrics Deprecation and Removal (&10107 - closed), we want to remove the GitLab-Flavored Markdown Prometheus & Grafana metrics embeds portion of Category:Metrics.
Notable details
- groupobservability has added their own support for GFM embeds. This should not be removed.
- The order in which frontend & backend remove metrics embed code doesn't matter. Nothing will appear physically broken.
- We don't need to worry about invalidating the cache for markdown fields. After the frontend pieces are removed, there will be zero difference in how markdown containing a metrics dashboard url is presented.
Implementation plan
- Remove metrics-related banzai filters
- Remove metrics-related banzai redactors
- Cleanup class inheritance in observability embed banzai filter
Relevant code
The lists below are meant as an aid & may not be exhaustive.
Deletions:
lib/banzai/filter/inline_alert_metrics_filter.rb
lib/banzai/filter/inline_cluster_metrics_filter.rb
lib/banzai/filter/inline_metrics_filter.rb
lib/banzai/filter/inline_grafana_metrics_filter.rb
lib/banzai/filter/inline_metrics_redactor_filter.rb
spec/features/markdown/metrics_spec.rb
ee/spec/features/markdown/metrics_spec.rb
Cleanups:
lib/banzai/pipeline/gfm_pipeline.rb
-
lib/banzai/filter/inline_embeds_filter.rb
(still partially required for observability embeds) ee/lib/ee/banzai/pipeline/gfm_pipeline.rb
Edited by Sarah Yasonik