Skip to content

Commit

Permalink
Update velero module dependency
Browse files Browse the repository at this point in the history
Update required modifying backup phases that were observed during
backup actions, as constants for the phases have changed.

Signed-off-by: Shyamsundar Ranganathan <[email protected]>
  • Loading branch information
ShyamsundarR committed Dec 23, 2024
1 parent 4df09e7 commit 4b13130
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/ramendr/ramen

go 1.22.5
go 1.22.8

toolchain go1.22.7
toolchain go1.22.9

// This replace should always be here for ease of development.
replace github.com/ramendr/ramen/api => ./api
Expand All @@ -22,7 +22,7 @@ require (
github.com/ramendr/recipe v0.0.0-20240918115450-667b9d79599f
github.com/stolostron/multicloud-operators-foundation v0.0.0-20220824091202-e9cd9710d009
github.com/stolostron/multicloud-operators-placementrule v1.2.4-1-20220311-8eedb3f.0.20230828200208-cd3c119a7fa0
github.com/vmware-tanzu/velero v1.9.1
github.com/vmware-tanzu/velero v1.15.0
go.uber.org/zap v1.27.0
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0
golang.org/x/time v0.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8=
github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
github.com/vmware-tanzu/velero v1.9.1 h1:uZhNMq1Pn8AZjT7HLtKseTq47EeHeIuUxvGPFFp/+Vs=
github.com/vmware-tanzu/velero v1.9.1/go.mod h1:75v4RUMzs8RK6Kqmrg6jgIOBaHUgAWwWAFiWERw2l4U=
github.com/vmware-tanzu/velero v1.15.0 h1:+S/lNSDwQqlROGWfmNuZnnabopGmco978COIt3AP09c=
github.com/vmware-tanzu/velero v1.15.0/go.mod h1:28VhzPJRBo91GBRkgs4Ird0fx2vCpepBWmhF+5Pn/WQ=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
22 changes: 15 additions & 7 deletions internal/controller/kubeobjects/velero/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,11 @@ func backupDummyStatusProcessAndRestore(
)
case velero.BackupPhaseNew,
velero.BackupPhaseInProgress,
velero.BackupPhaseUploading,
velero.BackupPhaseUploadingPartialFailure,
velero.BackupPhaseDeleting:
velero.BackupPhaseWaitingForPluginOperations,
velero.BackupPhaseWaitingForPluginOperationsPartiallyFailed,
velero.BackupPhaseDeleting,
velero.BackupPhaseFinalizing,
velero.BackupPhaseFinalizingPartiallyFailed:
return nil, kubeobjects.RequestProcessingErrorCreate("backup" + string(backup.Status.Phase))
case velero.BackupPhaseFailedValidation:
return nil, errors.New("backup" + string(backup.Status.Phase))
Expand Down Expand Up @@ -282,7 +284,11 @@ func restoreStatusProcess(
case velero.RestorePhaseCompleted:
return nil
case velero.RestorePhaseNew,
velero.RestorePhaseInProgress:
velero.RestorePhaseInProgress,
velero.RestorePhaseWaitingForPluginOperations,
velero.RestorePhaseWaitingForPluginOperationsPartiallyFailed,
velero.RestorePhaseFinalizing,
velero.RestorePhaseFinalizingPartiallyFailed:
return kubeobjects.RequestProcessingErrorCreate("restore" + string(restore.Status.Phase))
case velero.RestorePhaseFailed,
velero.RestorePhaseFailedValidation,
Expand Down Expand Up @@ -396,9 +402,11 @@ func backupRealStatusProcess(
return nil
case velero.BackupPhaseNew,
velero.BackupPhaseInProgress,
velero.BackupPhaseUploading,
velero.BackupPhaseUploadingPartialFailure,
velero.BackupPhaseDeleting:
velero.BackupPhaseWaitingForPluginOperations,
velero.BackupPhaseWaitingForPluginOperationsPartiallyFailed,
velero.BackupPhaseDeleting,
velero.BackupPhaseFinalizing,
velero.BackupPhaseFinalizingPartiallyFailed:
return kubeobjects.RequestProcessingErrorCreate("backup" + string(backup.Status.Phase))
case velero.BackupPhaseFailedValidation,
velero.BackupPhasePartiallyFailed,
Expand Down

0 comments on commit 4b13130

Please sign in to comment.