{"record":{"id":"587ef8e4a75f5bdc","repo":"kubernetes/kops","slug":"unhandled-type-for-q-t","errorCode":null,"errorMessage":"Unhandled type for %q: %T","messagePattern":"Unhandled type for %q: %T","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/topological_sort.go","lineNumber":142,"sourceCode":"\t\t\t\t// Ignore self - we are a struct, but not our own dependency!\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\t// TODO: Can we / should we use a type-switch statement\n\t\t\tintf := v.Addr().Interface()\n\t\t\tif hd, ok := intf.(HasDependencies[T]); ok {\n\t\t\t\tdeps := hd.GetDependencies(tasks)\n\t\t\t\tdependencies = append(dependencies, deps...)\n\t\t\t\t// Add the direct dependency if it's a task as well\n\t\t\t\tif dep, ok := intf.(Task[T]); ok {\n\t\t\t\t\tdependencies = append(dependencies, dep)\n\t\t\t\t}\n\t\t\t} else if dep, ok := intf.(Task[T]); ok {\n\t\t\t\tdependencies = append(dependencies, dep)\n\t\t\t} else if _, ok := intf.(Resource); ok {\n\t\t\t\t// Ignore: not a dependency, unless we explicitly implement HasDependencies (e.g. TaskDependentResource)\n\t\t\t} else {\n\t\t\t\treturn fmt.Errorf(\"Unhandled type for %q: %T\", path, v.Interface())\n\t\t\t}\n\t\t\treturn reflectutils.SkipReflection\n\n\t\tdefault:\n\t\t\tklog.Infof(\"Unhandled kind for %q: %T\", path, v.Interface())\n\t\t\treturn fmt.Errorf(\"Unhandled kind for %q: %v\", path, v.Kind())\n\t\t}\n\t}\n\n\terr := reflectutils.ReflectRecursive(v, visitor, &reflectutils.ReflectOptions{DeprecatedDoubleVisit: true})\n\tif err != nil {\n\t\tklog.Fatalf(\"unexpected error finding dependencies %v\", err)\n\t}\n\n\treturn dependencies\n}\n","sourceCodeStart":124,"sourceCodeEnd":159,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/topological_sort.go#L124-L159","documentation":"Error \"Unhandled type for %q: %T\" thrown in kubernetes/kops.","triggerScenarios":"Thrown at upup/pkg/fi/topological_sort.go:142 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}