{"record":{"id":"6fbdd53e625ce301","repo":"kubernetes/kops","slug":"unhandled-change-type-v","errorCode":null,"errorMessage":"unhandled change type: %v","messagePattern":"unhandled change type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/dryrun_target.go","lineNumber":399,"sourceCode":"\t\t\t\tcase Resource:\n\t\t\t\t\tresA, okA := tryResourceAsString(fieldValA)\n\t\t\t\t\tresE, okE := tryResourceAsString(fieldValE)\n\t\t\t\t\tif okA && okE {\n\t\t\t\t\t\tdescription = diff.FormatDiff(resA, resE)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif !ignored && description == \"\" {\n\t\t\t\t\tdescription = fmt.Sprintf(\" %v -> %v\", reflectutils.ValueAsString(fieldValA), reflectutils.ValueAsString(fieldValE))\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ignored {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tchangeList = append(changeList, change{FieldName: valC.Type().Field(i).Name, Description: description})\n\t\t}\n\t} else {\n\t\treturn nil, fmt.Errorf(\"unhandled change type: %v\", valC.Type())\n\t}\n\n\treturn changeList, nil\n}\n\nfunc tryResourceAsString(v reflect.Value) (string, bool) {\n\tif !v.IsValid() {\n\t\treturn \"\", false\n\t}\n\tif !v.CanInterface() {\n\t\treturn \"\", false\n\t}\n\n\t// Guard against nil interface go-tcha\n\tif v.Kind() == reflect.Interface && v.IsNil() {\n\t\treturn \"\", false\n\t}\n\tif v.Kind() == reflect.Ptr && v.IsNil() {","sourceCodeStart":381,"sourceCodeEnd":417,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/dryrun_target.go#L381-L417","documentation":"Thrown by buildChangeList in the dry-run target when the changes object's Go type is neither a struct nor a map — the reflect-based differ only knows how to enumerate struct fields or map entries. It indicates a task used a changes type of an unexpected kind (slice, basic type, pointer-to-non-struct, etc.), so the diff report cannot be produced.","triggerScenarios":"Thrown at upup/pkg/fi/dryrun_target.go:399 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Make the task's changes type a struct (fields are diffed individually) or a map[string]... ","Avoid slices or scalar types as the changes object; wrap them in a struct field","Add a case for the new kind in buildChangeList if extending the differ"],"exampleFix":null,"handlingStrategy":"validation","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"}