Skip to content

Commit e4d2823

Browse files
committed
Update the cache before updating the rule manager
Signed-off-by: Xiaochao Dong (@damnever) <[email protected]>
1 parent dfe7331 commit e4d2823

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/ruler/manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func (r *DefaultMultiTenantManager) syncRulesToManager(ctx context.Context, user
211211
if !existing || rulesUpdated || externalLabelsUpdated {
212212
level.Debug(r.logger).Log("msg", "updating rules", "user", user)
213213
r.configUpdatesTotal.WithLabelValues(user).Inc()
214-
if rulesUpdated && existing {
214+
if (rulesUpdated || externalLabelsUpdated) && existing {
215215
r.updateRuleCache(user, manager.RuleGroups())
216216
}
217217
err = manager.Update(r.cfg.EvaluationInterval, files, externalLabels, r.cfg.ExternalURL.String(), ruleGroupIterationFunc)

0 commit comments

Comments
 (0)