Skip to content

Commit 385d3b4

Browse files
Merge pull request #462 from Mhodesty/SREP-652
Fix bug SREP-652: User's incorrectly reporting as not banned.
2 parents 40a70c6 + 7f4981f commit 385d3b4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

pkg/ocm/ocm.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,12 @@ func GetCreatorFromCluster(ocmConn *sdk.Connection, cluster *cmv1.Cluster) (*amv
344344
return nil, fmt.Errorf("expecting status 'Active' found %v", status)
345345
}
346346

347-
creator, ok := subscription.GetCreator()
347+
accountResponse, err := ocmConn.AccountsMgmt().V1().Accounts().Account(subscription.Creator().ID()).Get().Send()
348+
if err != nil {
349+
return nil, err
350+
}
351+
352+
creator, ok := accountResponse.GetBody()
348353
if !ok {
349354
return nil, errors.New("failed to get creator from subscription")
350355
}

test/generate_incident.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ declare -A alert_mapping=(
1111
["MachineHealthCheckUnterminatedShortCircuitSRE"]="MachineHealthCheckUnterminatedShortCircuitSRE CRITICAL (1)"
1212
["ApiErrorBudgetBurn"]="api-ErrorBudgetBurn k8sgpt test CRITICAL (1)"
1313
["CannotRetrieveUpdatesSRE"]="CannotRetrieveUpdatesSRE"
14+
["UpgradeConfigSyncFailureOver4HrSRE"]="UpgradeConfigSyncFailureOver4HrSRE Critical (1)"
1415
)
1516

1617
# Function to print help message

0 commit comments

Comments
 (0)