Skip to content

Commit

Permalink
Return reconcile.TerminalError if getBackupSummary originates the error
Browse files Browse the repository at this point in the history
  • Loading branch information
rzvoncek committed Dec 2, 2024
1 parent f9de3b3 commit f003b04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/medusa/medusabackupjob_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package medusa

import (
"context"
"errors"
"fmt"
"net"
"strings"
Expand All @@ -34,6 +33,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
"sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

"github.com/go-logr/logr"
cassdcapi "github.com/k8ssandra/cass-operator/apis/cassandra/v1beta1"
Expand Down Expand Up @@ -253,7 +253,7 @@ func (r *MedusaBackupJobReconciler) getBackupSummary(ctx context.Context, backup
}
}
}
return nil, errors.New("backup summary couldn't be found")
return nil, reconcile.TerminalError(fmt.Errorf("backup summary couldn't be found"))
}

func (r *MedusaBackupJobReconciler) createMedusaBackup(ctx context.Context, backup *medusav1alpha1.MedusaBackupJob, backupSummary *medusa.BackupSummary, logger logr.Logger) error {
Expand Down

0 comments on commit f003b04

Please sign in to comment.