Alerting: Fix newly created alert rules not immediately showing up in folder view (#109584)

Fix incorrect tag provided for namespace endpoint
This commit is contained in:
Tom Ratcliffe
2025-08-13 14:56:16 +00:00
committed by GitHub
parent e21eda9413
commit 789a61230d
@@ -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