{"record":{"id":"4286f9735acaad6e","repo":"kubernetes/kops","slug":"missing-instance-id","errorCode":null,"errorMessage":"missing instance id","messagePattern":"missing instance id","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/nodeidentity/linode/identify.go","lineNumber":132,"sourceCode":"\t\tif err := i.cache.Add(info); err != nil {\n\t\t\tklog.Warningf(\"Failed to add node identity info to cache: %v\", err)\n\t\t}\n\t}\n\n\treturn info, nil\n}\n\n// parseInstanceIDFromProviderID extracts the numeric instance ID and string ID from a provider ID.\n// It supports formats like \"linode://123\", \"linode:///123\", and \"linode://region/123\".\nfunc parseInstanceIDFromProviderID(providerID string) (int, string, error) {\n\tif !strings.HasPrefix(providerID, providerIDPrefix) {\n\t\treturn 0, \"\", fmt.Errorf(\"missing prefix %q\", providerIDPrefix)\n\t}\n\n\traw := strings.TrimPrefix(providerID, providerIDPrefix)\n\traw = strings.Trim(raw, \"/\")\n\tif raw == \"\" {\n\t\treturn 0, \"\", fmt.Errorf(\"missing instance id\")\n\t}\n\n\tparts := strings.Split(raw, \"/\")\n\tinstanceID := parts[len(parts)-1]\n\tif instanceID == \"\" {\n\t\treturn 0, \"\", fmt.Errorf(\"missing instance id\")\n\t}\n\n\tlinodeID, err := strconv.Atoi(instanceID)\n\tif err != nil {\n\t\treturn 0, \"\", fmt.Errorf(\"invalid instance id %q: %w\", instanceID, err)\n\t}\n\n\treturn linodeID, instanceID, nil\n}\n\n// isExpectedInstanceStatus returns true if the instance is in a state where it can be identified.\nfunc isExpectedInstanceStatus(status linodego.InstanceStatus) bool {","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/nodeidentity/linode/identify.go#L114-L150","documentation":"The provider ID carried the linode:// prefix but no numeric instance ID remained after trimming the prefix and any region path segment. The string parsed as a linode-shaped ID but contained no usable instance number.","triggerScenarios":"Thrown at pkg/nodeidentity/linode/identify.go:132 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the provider ID to include the numeric instance ID (e.g. linode://12345)","Check for truncated or hand-edited providerID values"],"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"}