Skip to content

Commit

Permalink
set no pucm pending properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Ontiveros authored and petrkotas committed Jul 18, 2023
1 parent 9f8a596 commit 0e4a76c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/backend/openshiftcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (ocb *openShiftClusterBackend) handle(ctx context.Context, log *logrus.Entr
if err != nil {
return ocb.endLease(ctx, log, stop, doc, api.ProvisioningStateFailed, err)
}
doc.OpenShiftCluster.Properties.PucmPending = false
ocb.setNoPucmPending(ctx, doc)
return ocb.endLease(ctx, log, stop, doc, api.ProvisioningStateSucceeded, nil)

case api.ProvisioningStateUpdating:
Expand Down Expand Up @@ -362,3 +362,10 @@ func (ocb *openShiftClusterBackend) emitMetrics(doc *api.OpenShiftClusterDocumen
"newProvisioningState": string(provisioningState),
})
}

func (ocb *openShiftClusterBackend) setNoPucmPending(ctx context.Context, doc *api.OpenShiftClusterDocument) (*api.OpenShiftClusterDocument, error) {
return ocb.dbOpenShiftClusters.Patch(ctx, doc.Key, func(doc *api.OpenShiftClusterDocument) error {
doc.OpenShiftCluster.Properties.PucmPending = false
return nil
})
}

0 comments on commit 0e4a76c

Please sign in to comment.