{"record":{"id":"bfd16085e3af6bcd","repo":"kubernetes/kops","slug":"unexpected-format-for-serviceaccount-email-q","errorCode":null,"errorMessage":"unexpected format for ServiceAccount email %q","messagePattern":"unexpected format for ServiceAccount email %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gce/gce_cloud.go","lineNumber":440,"sourceCode":"\n\treturn tokenInfo, nil\n}\n\n// SplitServiceAccountEmail splits service account email\nfunc SplitServiceAccountEmail(email string) (string, string, error) {\n\taccountID := \"\"\n\tprojectID := \"\"\n\n\ttokens := strings.Split(email, \"@\")\n\tif len(tokens) == 2 {\n\t\taccountID = tokens[0]\n\t\tif strings.HasSuffix(tokens[1], \".iam.gserviceaccount.com\") {\n\t\t\tprojectID = strings.TrimSuffix(tokens[1], \".iam.gserviceaccount.com\")\n\t\t}\n\t}\n\n\tif accountID == \"\" || projectID == \"\" {\n\t\treturn \"\", \"\", fmt.Errorf(\"unexpected format for ServiceAccount email %q\", email)\n\t}\n\treturn accountID, projectID, nil\n}\n","sourceCodeStart":422,"sourceCodeEnd":444,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gce/gce_cloud.go#L422-L444","documentation":"Format-validation guard in SplitServiceAccountEmail: the email does not match <accountID>@<projectID>.iam.gserviceaccount.com (or lacks an @), so it cannot be split into account and project IDs. Fires when a misconfigured service account email reaches GCE task rendering/lookup.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/gce/gce_cloud.go:440 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the service account email in the cluster/task spec","Copy the exact email from the GCP IAM console","Ensure it ends with .iam.gserviceaccount.com"],"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-12T12:17:11.808Z"}