Skip to content

Commit

Permalink
fix(application): syncAppFromRelease panic when helm list failed (#1702)
Browse files Browse the repository at this point in the history
Co-authored-by: xdonggao <[email protected]>
  • Loading branch information
GaoXiaodong and xdonggao committed Dec 10, 2021
1 parent 4647d5d commit b9e45bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/application/controller/app/app_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,11 @@ func (c *Controller) syncAppFromRelease(ctx context.Context, cachedApp *cachedAp
if app.Status.Phase == applicationv1.AppPhaseSucceeded && hasSynced(app) {
return app, nil
}

defer func() {
if r := recover(); r != nil {
log.Error("syncAppFromRelease panic")
}
}()
newStatus := app.Status.DeepCopy()
rels, err := action.List(ctx, c.client.ApplicationV1(), c.platformClient, app)
if err != nil {
Expand Down

0 comments on commit b9e45bd

Please sign in to comment.