Skip to content

Commit 8b491b5

Browse files
authored
Downgrade Velero to v1.10 (#1462)
In order to be compatible with KOTS, downgrade Velero to 1.10. This removes some features from the Velero collector, but unblocks KOTS from being able to import Troubleshoot. We should be wary of updating Velero in the future to prevent this recurring. sc-98475
1 parent 18efea6 commit 8b491b5

File tree

4 files changed

+10
-39
lines changed

4 files changed

+10
-39
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ require (
3737
github.com/spf13/viper v1.18.2
3838
github.com/stretchr/testify v1.8.4
3939
github.com/tj/go-spin v1.1.0
40-
github.com/vmware-tanzu/velero v1.12.0
40+
github.com/vmware-tanzu/velero v1.10.3
4141
go.opentelemetry.io/otel v1.23.0
4242
go.opentelemetry.io/otel/sdk v1.23.0
4343
golang.org/x/exp v0.0.0-20231006140011-7918f672742d

go.sum

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ github.com/14rcole/gopopulate v0.0.0-20180821133914-b175b219e774 h1:SCbEWT58NSt7
191191
github.com/14rcole/gopopulate v0.0.0-20180821133914-b175b219e774/go.mod h1:6/0dYRLLXyJjbkIPeeGyoJ/eKOSI0eU6eTlCBYibgd0=
192192
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU=
193193
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8=
194-
github.com/Azure/azure-sdk-for-go v67.2.0+incompatible h1:Uu/Ww6ernvPTrpq31kITVTIm/I5jlJ1wjtEH/bmSB2k=
194+
github.com/Azure/azure-sdk-for-go v61.4.0+incompatible h1:BF2Pm3aQWIa6q9KmxyF1JYKYXtVw67vtvu2Wd54NGuY=
195195
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 h1:/iHxaJhsFr0+xVFfbMr5vxz848jyiWuIEDhYq3y5odY=
196196
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q=
197197
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg=
@@ -890,8 +890,8 @@ github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinC
890890
github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk=
891891
github.com/vladimirvivien/gexe v0.2.0 h1:nbdAQ6vbZ+ZNsolCgSVb9Fno60kzSuvtzVh6Ytqi/xY=
892892
github.com/vladimirvivien/gexe v0.2.0/go.mod h1:LHQL00w/7gDUKIak24n801ABp8C+ni6eBht9vGVst8w=
893-
github.com/vmware-tanzu/velero v1.12.0 h1:gN8PbQMYOAMv8OYE3RkIvxr6s6IoMS0Daxc+IQN0X5U=
894-
github.com/vmware-tanzu/velero v1.12.0/go.mod h1:rY2UfdC2K9je9jtjnSBsZr8Zmg8hzePjG2W00Oe/CT4=
893+
github.com/vmware-tanzu/velero v1.10.3 h1:prE24sOog/jhBt7LivY+k6NbKwU+0nl1JAbJWA91mdo=
894+
github.com/vmware-tanzu/velero v1.10.3/go.mod h1:3/m52SOiTP/L+Qp0E6+Gk688niyVxowLCLniQbTkSPA=
895895
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
896896
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo=
897897
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=

pkg/analyze/velero.go

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,9 @@ func analyzeBackups(backups []*velerov1.Backup) []*AnalyzeResult {
361361
results := []*AnalyzeResult{}
362362

363363
failedPhases := map[velerov1.BackupPhase]bool{
364-
velerov1.BackupPhaseFailed: true,
365-
velerov1.BackupPhasePartiallyFailed: true,
366-
velerov1.BackupPhaseFailedValidation: true,
367-
velerov1.BackupPhaseFinalizingPartiallyFailed: true,
368-
velerov1.BackupPhaseWaitingForPluginOperationsPartiallyFailed: true,
364+
velerov1.BackupPhaseFailed: true,
365+
velerov1.BackupPhasePartiallyFailed: true,
366+
velerov1.BackupPhaseFailedValidation: true,
369367
}
370368

371369
for _, backup := range backups {
@@ -510,10 +508,9 @@ func analyzeRestores(restores []*velerov1.Restore) []*AnalyzeResult {
510508
if len(restores) > 0 {
511509

512510
failedPhases := map[velerov1.RestorePhase]bool{
513-
velerov1.RestorePhaseFailed: true,
514-
velerov1.RestorePhasePartiallyFailed: true,
515-
velerov1.RestorePhaseFailedValidation: true,
516-
velerov1.RestorePhaseWaitingForPluginOperationsPartiallyFailed: true,
511+
velerov1.RestorePhaseFailed: true,
512+
velerov1.RestorePhasePartiallyFailed: true,
513+
velerov1.RestorePhaseFailedValidation: true,
517514
}
518515

519516
for _, restore := range restores {

pkg/analyze/velero_test.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -626,32 +626,6 @@ func TestAnalyzeVelero_Restores(t *testing.T) {
626626
},
627627
},
628628
},
629-
{
630-
name: "restores - failures",
631-
args: args{
632-
restores: []*velerov1.Restore{
633-
{
634-
ObjectMeta: metav1.ObjectMeta{
635-
Name: "observability-backup-20210308150016",
636-
Namespace: "velero",
637-
},
638-
Spec: velerov1.RestoreSpec{
639-
BackupName: "observability-backup",
640-
},
641-
Status: velerov1.RestoreStatus{
642-
Phase: velerov1.RestorePhaseWaitingForPluginOperationsPartiallyFailed,
643-
},
644-
},
645-
},
646-
},
647-
want: []*AnalyzeResult{
648-
{
649-
Title: "Restore observability-backup-20210308150016",
650-
Message: "Restore observability-backup-20210308150016 phase is WaitingForPluginOperationsPartiallyFailed",
651-
IsFail: true,
652-
},
653-
},
654-
},
655629
}
656630
for _, tt := range tests {
657631
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)