thanos-io/thanos · error
strategy , update rules
Error message
strategy %s, update rules
What it means
Raised in Manager.Update when the per-strategy Prometheus rules.Manager Update call fails — i.e., the underlying rule groups for that strategy failed Prometheus parsing, validation, or loading (bad expressions, duplicate group names, invalid intervals). The error wraps the upstream manager's error with 'strategy %s, update rules'.
Solutions
- Fix the rule file syntax/semantics named in the wrapped error (invalid PromQL, duplicate groups, bad durations)
- Validate rule files with promtool before deploying
- Compare with the previous working rule files to find the regression
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/rules/manager.go:394 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/ee8abcc7204d8274.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/rules/manager.go:394
errs.Add(errors.Wrapf(err, "write file %v", newFn))
continue
}
filesByStrategy[s] = append(filesByStrategy[s], newFn)
ruleFiles[newFn] = fn
}
}
m.mtx.Lock()
for s, fs := range filesByStrategy {
mgr, ok := m.mgrs[s]
if !ok {
errs.Add(errors.Errorf("no manager found for %v", s))
continue
}
// We add external labels in `pkg/alert.Queue`.
if err := mgr.Update(evalInterval, fs, m.extLset, m.externalURL, nil); err != nil {
// TODO(bwplotka): Prometheus logs all error details. Fix it upstream to have consistent error handling.
errs.Add(errors.Wrapf(err, "strategy %s, update rules", s))
continue
}
}
m.ruleFiles = ruleFiles
m.mtx.Unlock()
return errs.Err()
}
// Rules returns specified rules from manager. This is used by gRPC and locally for HTTP and UI purposes.
func (m *Manager) Rules(r *rulespb.RulesRequest, s rulespb.Rules_RulesServer) (err error) {
groups := m.protoRuleGroups()
pgs := make([]*rulespb.RuleGroup, 0, len(groups))
for _, g := range groups {
// UTC needed due to https://github.com/gogo/protobuf/issues/519.
g.LastEvaluation = g.LastEvaluation.UTC()
if r.Type == rulespb.RulesRequest_ALL {View on GitHub (pinned to 35b8b99117)