From 789a61230d45ecc9742d858c4af233bf67ab17b4 Mon Sep 17 00:00:00 2001 From: Tom Ratcliffe Date: Wed, 13 Aug 2025 15:56:16 +0100 Subject: [PATCH] Alerting: Fix newly created alert rules not immediately showing up in folder view (#109584) Fix incorrect tag provided for namespace endpoint --- public/app/features/alerting/unified/api/alertRuleApi.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/app/features/alerting/unified/api/alertRuleApi.ts b/public/app/features/alerting/unified/api/alertRuleApi.ts index faebd9334ed..35569448d9b 100644 --- a/public/app/features/alerting/unified/api/alertRuleApi.ts +++ b/public/app/features/alerting/unified/api/alertRuleApi.ts @@ -246,7 +246,9 @@ export const alertRuleApi = alertingApi.injectEndpoints({ const { path, params } = rulerUrlBuilder(rulerConfig).namespace(namespace); return { url: path, params }; }, - providesTags: (_result, _error, { namespace }) => [{ type: 'RuleNamespace', id: namespace }], + providesTags: (_result, _error, { namespace, rulerConfig }) => [ + { type: 'RuleNamespace', id: `${rulerConfig.dataSourceUid}/${namespace}` }, + ], }), // TODO This should be probably a separate ruler API file