{"record":{"id":"6aa762244a5ee4bf","repo":"kubernetes/kops","slug":"error-hashing-manifest-v","errorCode":null,"errorMessage":"error hashing manifest: %v","messagePattern":"error hashing manifest: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"channels/pkg/channels/addons.go","lineNumber":68,"sourceCode":"\n\tobjects, err := kubemanifest.LoadObjectsFrom([]byte(configString))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error parsing addons or manifest: %v\", err)\n\t}\n\n\tapiObject := &api.Addons{}\n\tif len(objects) == 0 {\n\t\t// No objects (empty, whitespace, or comment-only content): nothing to apply.\n\t} else if gvk := objects[0].GroupVersionKind(); gvk.Kind == \"Addons\" && gvk.Group == \"\" && gvk.Version == \"\" {\n\t\t// Reuse the document already parsed by LoadObjectsFrom instead of parsing it again.\n\t\tif err := objects[0].Reparse(apiObject); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error parsing addons: %v\", err)\n\t\t}\n\t} else {\n\t\tmanifest := location.String()\n\t\tmanifestHash, err := utils.HashString(configString)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error hashing manifest: %v\", err)\n\t\t}\n\t\tmanifestLocationHash, err := utils.HashString(manifest)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error hashing manifest location: %v\", err)\n\t\t}\n\t\taddonName := \"manifest-\" + manifestLocationHash[:12]\n\t\taddonSpec := &api.AddonSpec{\n\t\t\tName:         &addonName,\n\t\t\tManifest:     &manifest,\n\t\t\tManifestHash: manifestHash,\n\t\t}\n\n\t\tapiObject.Kind = \"Addons\"\n\t\tapiObject.ObjectMeta.Name = addonName\n\t\tapiObject.Spec.Addons = []*api.AddonSpec{addonSpec}\n\t}\n\n\treturn &Addons{ChannelName: name, ChannelLocation: *location, APIObject: apiObject}, nil","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/channels/pkg/channels/addons.go#L50-L86","documentation":"When the addons file is a direct (non-Addons) manifest, ParseAddons hashes the raw manifest content with utils.HashString to derive a stable ManifestHash. This wraps a hashing failure, which is effectively unreachable in practice but kept as defensive error handling.","triggerScenarios":"LoadAddons -> ParseAddons on the else-branch (direct manifest) where utils.HashString(configString) returns non-nil. HashString has no realistic failure mode for string input; only a corrupted binary or allocator failure could trigger it.","commonSituations":"Practically never hit by users; would indicate a corrupted build or out-of-memory condition rather than bad input.","solutions":["Rebuild/reinstall the kops or channels binary.","Retry the operation; the failure is transient at worst.","If reproducible, file an upstream bug including the manifest input, since HashString should never fail on strings."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"addons, err := channels.ParseAddons(name, location, data)\nif err != nil {\n\tif strings.Contains(err.Error(), \"error hashing manifest\") {\n\t\t// not input-related; treat as internal failure and retry\n\t\tretryWithBackoff(2, func() error { _, err = channels.ParseAddons(name, location, data); return err })\n\t}\n\treturn err\n}","preventionTips":["Use official kops builds.","Treat this error as a bug-report trigger, not a config issue."],"tags":["hashing","defensive","unreachable"],"backgroundTag":"manifest-hash-failed","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"}