From cd31141b936cf700ed6575a26f7ec0009b990b82 Mon Sep 17 00:00:00 2001 From: JenTing Hsiao Date: Wed, 9 Sep 2020 04:08:56 +0800 Subject: [PATCH] Show format version on velero backup describe (#2901) * Show format version on velero backup describe Signed-off-by: JenTing Hsiao * Add changelog Signed-off-by: JenTing Hsiao --- changelogs/unreleased/2901-jenting | 1 + pkg/cmd/util/output/backup_describer.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/unreleased/2901-jenting diff --git a/changelogs/unreleased/2901-jenting b/changelogs/unreleased/2901-jenting new file mode 100644 index 000000000..6b175d920 --- /dev/null +++ b/changelogs/unreleased/2901-jenting @@ -0,0 +1 @@ +Use format version instead of version on `velero backup describe` since version has been deprecated diff --git a/pkg/cmd/util/output/backup_describer.go b/pkg/cmd/util/output/backup_describer.go index 9d813ce17..117ffa60f 100644 --- a/pkg/cmd/util/output/backup_describer.go +++ b/pkg/cmd/util/output/backup_describer.go @@ -232,7 +232,8 @@ func DescribeBackupSpec(d *Describer, spec velerov1api.BackupSpec) { func DescribeBackupStatus(d *Describer, backup *velerov1api.Backup, details bool, veleroClient clientset.Interface, insecureSkipTLSVerify bool, caCertPath string) { status := backup.Status - d.Printf("Backup Format Version:\t%d\n", status.Version) + // Status.Version has been deprecated, use Status.FormatVersion + d.Printf("Backup Format Version:\t%s\n", status.FormatVersion) d.Println() // "" output should only be applicable for backups that failed validation