{"record":{"id":"148cae63902703f5","repo":"thanos-io/thanos","slug":"no-manager-found-for-v","errorCode":null,"errorMessage":"no manager found for %v","messagePattern":"no manager found for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/rules/manager.go","lineNumber":388,"sourceCode":"\t\t\tnewFn := filepath.Join(m.workDir, s.String(), fn)\n\t\t\tif err := os.MkdirAll(filepath.Dir(newFn), os.ModePerm); err != nil {\n\t\t\t\terrs.Add(errors.Wrapf(err, \"create %s\", filepath.Dir(newFn)))\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif err := os.WriteFile(newFn, b, os.ModePerm); err != nil {\n\t\t\t\terrs.Add(errors.Wrapf(err, \"write file %v\", newFn))\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfilesByStrategy[s] = append(filesByStrategy[s], newFn)\n\t\t\truleFiles[newFn] = fn\n\t\t}\n\t}\n\n\tm.mtx.Lock()\n\tfor s, fs := range filesByStrategy {\n\t\tmgr, ok := m.mgrs[s]\n\t\tif !ok {\n\t\t\terrs.Add(errors.Errorf(\"no manager found for %v\", s))\n\t\t\tcontinue\n\t\t}\n\t\t// We add external labels in `pkg/alert.Queue`.\n\t\tif err := mgr.Update(evalInterval, fs, m.extLset, m.externalURL, nil); err != nil {\n\t\t\t// TODO(bwplotka): Prometheus logs all error details. Fix it upstream to have consistent error handling.\n\t\t\terrs.Add(errors.Wrapf(err, \"strategy %s, update rules\", s))\n\t\t\tcontinue\n\t\t}\n\t}\n\tm.ruleFiles = ruleFiles\n\tm.mtx.Unlock()\n\n\treturn errs.Err()\n}\n\n// Rules returns specified rules from manager. This is used by gRPC and locally for HTTP and UI purposes.\nfunc (m *Manager) Rules(r *rulespb.RulesRequest, s rulespb.Rules_RulesServer) (err error) {\n\tgroups := m.protoRuleGroups()","sourceCodeStart":370,"sourceCodeEnd":406,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/rules/manager.go#L370-L406","documentation":"Raised in Manager.Update: rule files were written for a PartialResponseStrategy, but m.mgrs has no rules.Manager registered for that strategy. This is an internal invariant violation — every strategy with staged files must have had a manager created during NewManager — typically caused by unsupported or misinitialized strategy configuration.","triggerScenarios":"Thrown at pkg/rules/manager.go:388 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure all PartialResponseStrategy values used by rule files have managers created at manager construction","Check that callers pass only supported strategies","Verify m.mgrs initialization was not skipped due to an earlier error"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}