Skip to content

Commit

Permalink
fix: handle logging more consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-vaca-humanes-wt committed Oct 29, 2024
1 parent 0c0927e commit 332a7e7
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -380,16 +380,15 @@ func (r *TupleGenerationTaskReconciler) deletePVC(ctx context.Context, key *Rost
found := &v1.PersistentVolumeClaim{}
err := r.Get(ctx, name, found)
if err != nil {
return fmt.Errorf("persistent volume claim deletion failed for task %v: %w", key, err)
return fmt.Errorf("to be deleted persistent volume claim not found for task %v: %w", key, err)
}
logger.V(logging.DEBUG).Info("Persistent Volume Claim already exists")

err = r.Delete(ctx, found)
if err != nil {
return fmt.Errorf("persistent volume claim deletion failed for task %v: %w", key, err)
}

logger.V(logging.DEBUG).Info("Deleted Persistent Volume Claim for task %v", key)
logger.V(logging.DEBUG).Info("Deleted Persistent Volume Claim for task")
return nil
}

Expand Down

0 comments on commit 332a7e7

Please sign in to comment.