{"record":{"id":"e082d880260ab66b","repo":"cockroachdb/cockroach","slug":"unknown-roachtest-of-name-s","errorCode":null,"errorMessage":"unknown roachtest of name %s","messagePattern":"unknown roachtest of name (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/testowner/testowner.go","lineNumber":95,"sourceCode":"\tdefer func() {\n\t\t_ = stdout.Flush()\n\t}()\n\tdefer func() {\n\t\t_ = stderr.Flush()\n\t}()\n\n\tif *roachtest {\n\t\treg := registryImpl{\n\t\t\tnameToOwner: make(map[string]registry.Owner),\n\t\t}\n\t\ttests.RegisterTests(&reg)\n\t\tif len(flag.Args()) == 0 {\n\t\t\tstdin := bufio.NewScanner(os.Stdin)\n\t\t\tfor stdin.Scan() {\n\t\t\t\tline := stdin.Text()\n\t\t\t\towner, ok := reg.nameToOwner[line]\n\t\t\t\tif !ok {\n\t\t\t\t\tpanic(fmt.Sprintf(\"unknown roachtest of name %s\", line))\n\t\t\t\t}\n\t\t\t\t_, err := stdout.WriteString(string(owner.ToTeamAlias()))\n\t\t\t\tif err != nil {\n\t\t\t\t\tpanic(err)\n\t\t\t\t}\n\t\t\t\terr = stdout.WriteByte('\\n')\n\t\t\t\tif err != nil {\n\t\t\t\t\tpanic(err)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif err := stdin.Err(); err != nil {\n\t\t\t\tpanic(err)\n\t\t\t}\n\n\t\t} else if len(flag.Args()) == 1 {\n\t\t\towner, ok := reg.nameToOwner[flag.Args()[0]]\n\t\t\tif !ok {\n\t\t\t\tpanic(fmt.Sprintf(\"unknown roachtest of name %s\", flag.Args()[0]))","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/cockroachdb/cockroach/blob/8812064a015d2faf99d3fc7e15880f94042954b0/pkg/cmd/testowner/testowner.go#L77-L113","documentation":"testowner maps roachtest names to owning teams: it registers every test via tests.RegisterTests into a nameToOwner map, then looks up each line read from stdin. An unknown name panics with 'unknown roachtest of name %s' — the input references a test that is not registered in this build of the registry.","triggerScenarios":"Piping a name that is misspelled, was renamed, includes a variant suffix that is not itself a test, or is conditionally registered (gated behind build tags or suite filters that skipped registration in this build).","commonSituations":"CI scripts holding stale roachtest names after a rename; ownership files generated from an older test list; names copied from test output that include variant decoration; tests skipped on the build platform.","solutions":["Get the canonical list from the registry (e.g. roachtest --list style output) and diff it against your input names","Fix the upstream generator (CI script/ownership file) emitting the stale name","If the test should exist, check whether registration is behind a build tag, suite guard, or skip that excluded it in this build"],"exampleFix":"# before\necho 'som_test_nma_typo' | ./testowner -roachtest\n\n# after (validate names against the registry first)\n./roachtest list --quiet > registered.txt\ngrep -Fxq 'some_test_name' registered.txt || { echo 'not a registered test' >&2; exit 1; }\necho 'some_test_name' | ./testowner -roachtest","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate name lists from the same build's registry instead of static files","Diff ownership inputs against roachtest --list output in CI before calling testowner","After renaming a test, sweep CI scripts and ownership files for stale names"],"tags":["roachtest","testowner","ci","registry","go"],"backgroundTag":null,"analyzedSha":"8812064a015d2faf99d3fc7e15880f94042954b0","analyzedAt":"2026-08-15T16:34:17.351Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}