Hide cluster health metrics when `remove_monitor_metrics` flag is true
What does this MR do and why?
Part of the %16.0 breaking change removals.
Hides the cluster health metrics page behind the remove_monitor_metrics
flag, in preparation to setting the flag to 'default: true'.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
For remove_monitor_metrics: false
- no change.
For remove_monitor_metrics: true
:
before | after |
---|---|
How to set up and validate locally
- Set up a certificate based cluster.
- Install prometheus on to the cluster.
- Set the
remove_monitor_metrics
flag.-
rails c
->Feature.enable(:remove_monitor_metrics)
-
- View the cluster health page.
Alternative:
- Apply this patch to load the cluster health page as part of a feature spec:
Click to expand
diff --git a/spec/features/clusters/cluster_health_dashboard_spec.rb b/spec/features/clusters/cluster_health_dashboard_spec.rb
index e932f8c6b98e..8c85199e49f7 100644
--- a/spec/features/clusters/cluster_health_dashboard_spec.rb
+++ b/spec/features/clusters/cluster_health_dashboard_spec.rb
@@ -38,12 +38,16 @@
it 'does not show the cluster health tab' do
visit cluster_path
+ live_debug
+
expect(page).not_to have_text('Health')
end
it 'does not show the cluster health section' do
visit project_cluster_path(clusterable, cluster, { tab: 'health' })
+ live_debug
+
expect(page).not_to have_text('you must first enable Prometheus in the Integrations tab')
end
end
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #399231 (closed)
Edited by Tristan Read