{"record":{"id":"8b578be8bb034d8b","repo":"kubernetes/kops","slug":"listing-eventbridge-rules-w","errorCode":null,"errorMessage":"listing EventBridge rules: %w","messagePattern":"listing EventBridge rules: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/awsmodel/nodeterminationhandler.go","lineNumber":205,"sourceCode":"\treturn nil\n}\n\nfunc (b *NodeTerminationHandlerBuilder) FindDeletions(c *fi.CloudupModelBuilderContext, cloud fi.Cloud) error {\n\tif b.Cluster.Spec.CloudProvider.AWS.NodeTerminationHandler != nil && fi.ValueOf(b.Cluster.Spec.CloudProvider.AWS.NodeTerminationHandler.EnableRebalanceDraining) {\n\t\treturn nil\n\t}\n\n\tclusterName := b.ClusterName()\n\tclusterNamePrefix := awsup.GetClusterName40(clusterName)\n\truleName := aws.String(clusterNamePrefix + \"-\" + rebalanceEvent.name)\n\n\teventBridge := cloud.(awsup.AWSCloud).EventBridge()\n\trequest := &eventbridge.ListRulesInput{\n\t\tNamePrefix: ruleName,\n\t}\n\tresponse, err := eventBridge.ListRules(c.Context(), request)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"listing EventBridge rules: %w\", err)\n\t}\n\tif response == nil || len(response.Rules) == 0 {\n\t\treturn nil\n\t}\n\tif len(response.Rules) > 1 {\n\t\treturn fmt.Errorf(\"found multiple EventBridge rules with the same name %s\", *ruleName)\n\t}\n\n\trule := response.Rules[0]\n\n\ttagResponse, err := eventBridge.ListTagsForResource(c.Context(), &eventbridge.ListTagsForResourceInput{ResourceARN: rule.Arn})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"listing tags for EventBridge rule: %w\", err)\n\t}\n\n\towned := false\n\townershipTag := \"kubernetes.io/cluster/\" + b.Cluster.ObjectMeta.Name\n\tfor _, tag := range tagResponse.Tags {","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/awsmodel/nodeterminationhandler.go#L187-L223","documentation":"ListRules against EventBridge failed while looking for the node-termination-handler rebalance-draining rule to delete; an AWS API error (permissions, throttling, wrong region).","triggerScenarios":"Thrown at pkg/model/awsmodel/nodeterminationhandler.go:205 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check EventBridge ListRules permissions","Retry on throttling","Verify the correct region/partition is configured"],"exampleFix":null,"handlingStrategy":"retry","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"}