Skip to content

Commit 01b0542

Browse files
Merge pull request #855 from stlaz/statushandler-undying-condition
OCPBUGS-28982: oauthclients: fix oauthclients degraded condition that never gets removed
2 parents 68c1a4d + d6c728b commit 01b0542

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pkg/console/controllers/oauthclients/oauthclients.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,11 @@ func (c *oauthClientsController) sync(ctx context.Context, controllerContext fac
195195
// This means that you cannot get to the desired state in a single update
196196
// as you first need to set the Authn type to OIDC, wait for the operator to
197197
// set the client, and only then you can configure the client in the provider.
198-
if err := c.authStatusHandler.Apply(ctx, authnConfig); err != nil {
199-
statusHandler.AddConditions(status.HandleProgressingOrDegraded("AuthStatusHandler", "FailedApply", err))
200-
return statusHandler.FlushAndReturn(err)
198+
applyErr := c.authStatusHandler.Apply(ctx, authnConfig)
199+
statusHandler.AddConditions(status.HandleProgressingOrDegraded("AuthStatusHandler", "FailedApply", applyErr))
200+
if applyErr != nil {
201+
syncErr = applyErr
202+
break
201203
}
202204
}
203205

0 commit comments

Comments
 (0)