Skip to content

Commit ef30372

Browse files
authored
Merge pull request opendatahub-io#729 from HumairAK/fix_delete_status_err
prevent dspa status update on a terminating dspa
2 parents 24f564b + 54b2cee commit ef30372

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

controllers/dspipeline_controller.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ func (r *DSPAReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.
218218
if err := r.Update(ctx, dspa); err != nil {
219219
return ctrl.Result{}, err
220220
}
221+
log.Info("DSPA resources cleaned up.")
221222
}
222223

223224
// Stop reconciliation as the item is being deleted
@@ -363,6 +364,11 @@ func (r *DSPAReconciler) setStatus(ctx context.Context, resourceName string, con
363364
func (r *DSPAReconciler) updateStatus(ctx context.Context, dspa *dspav1alpha1.DataSciencePipelinesApplication,
364365
dspaStatus dspastatus.DSPAStatus, log logr.Logger, req ctrl.Request) {
365366
r.refreshDspa(ctx, dspa, req, log)
367+
368+
// TODO: this is a workaround, handle deletion more gracefully
369+
if dspa.DeletionTimestamp != nil {
370+
return
371+
}
366372
dspa.Status.Components = r.GetComponents(ctx, dspa)
367373
dspa.Status.Conditions = dspaStatus.GetConditions()
368374
err := r.Status().Update(ctx, dspa)

0 commit comments

Comments
 (0)