From 842fd44e8329030241ca0a60355ecc9c44841386 Mon Sep 17 00:00:00 2001 From: Konrad Lalik Date: Wed, 13 Aug 2025 15:30:46 +0200 Subject: [PATCH] Alerting: Disable group consistency check for GMA rules (#109599) Disable consistency check for GMA rules --- .../unified/components/rule-viewer/RuleViewer.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/app/features/alerting/unified/components/rule-viewer/RuleViewer.tsx b/public/app/features/alerting/unified/components/rule-viewer/RuleViewer.tsx index 7c3dd139d8e..1d8f0e2ea5d 100644 --- a/public/app/features/alerting/unified/components/rule-viewer/RuleViewer.tsx +++ b/public/app/features/alerting/unified/components/rule-viewer/RuleViewer.tsx @@ -48,6 +48,7 @@ import { RulePluginOrigin, getRulePluginOrigin, isFederatedRuleGroup, + isGrafanaRuleIdentifier, isPausedRule, prometheusRuleType, rulerRuleType, @@ -83,12 +84,15 @@ export enum ActiveTab { const prometheusRulesPrimary = shouldUsePrometheusRulesPrimary(); const alertingListViewV2 = shouldUseAlertingListViewV2(); -const shouldUseConsistencyCheck = prometheusRulesPrimary || alertingListViewV2; - const RuleViewer = () => { const { rule, identifier } = useAlertRule(); const { pageNav, activeTab } = usePageNav(rule); + // GMA /api/v1/rules endpoint is strongly consistent, so we don't need to check for consistency + const shouldUseConsistencyCheck = isGrafanaRuleIdentifier(identifier) + ? false + : prometheusRulesPrimary || alertingListViewV2; + // this will be used to track if we are in the process of cloning a rule // we want to be able to show a modal if the rule has been provisioned explain the limitations // of duplicating provisioned alert rules