Skip to content

Commit

Permalink
apply review suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Florent Poinsard <[email protected]>
  • Loading branch information
frouioui committed Feb 27, 2025
1 parent 91897cc commit 072d109
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,9 @@ func (r *ReconcileVitessBackupsSchedule) createJob(
if err != nil {
return nil, err
}
} else {
return nil, fmt.Errorf("PVC already exists for job %s", job.Name)
}

return job, nil
}

Expand All @@ -595,7 +596,7 @@ func (r *ReconcileVitessBackupsSchedule) createJobPod(
return nil, nil, err
}

_, completeBackups, err := vitessbackup.GetBackups(ctx, vbsc.Namespace, vbsc.Spec.Cluster, strategy.Keyspace, vkr.SafeName(),
_, completedBackups, err := vitessbackup.GetBackups(ctx, vbsc.Namespace, vbsc.Spec.Cluster, strategy.Keyspace, vkr.SafeName(),
func(ctx context.Context, allBackupsList *planetscalev2.VitessBackupList, listOpts *client.ListOptions) error {
return r.client.List(ctx, allBackupsList, listOpts)
},
Expand All @@ -605,7 +606,7 @@ func (r *ReconcileVitessBackupsSchedule) createJobPod(
}

backupType := vitessbackup.TypeUpdate
if len(completeBackups) == 0 {
if len(completedBackups) == 0 {
if vts.Status.HasMaster == corev1.ConditionTrue {
backupType = vitessbackup.TypeFirstBackup
} else {
Expand Down

0 comments on commit 072d109

Please sign in to comment.