hide failed-items flag (#4965)
This flag is a guaranteed no-op since the error handling settings that allow for no-failure backups are not exposed in the CLI either. --- #### Does this PR need a docs update or release note? - [x] ⛔ No #### Type of change - [x] 🧹 Tech Debt/Cleanup #### Test Plan - [x] ⚡ Unit test - [x] 💚 E2E
This commit is contained in:
parent
d113fa3926
commit
79c96248f8
@ -334,7 +334,7 @@ func genericListCommand(
|
|||||||
fe.PrintItems(
|
fe.PrintItems(
|
||||||
ctx,
|
ctx,
|
||||||
!ifShow(flags.ListAlertsFV),
|
!ifShow(flags.ListAlertsFV),
|
||||||
!ifShow(flags.ListFailedItemsFV),
|
!ifShow(flags.FailedItemsFV),
|
||||||
!ifShow(flags.ListSkippedItemsFV),
|
!ifShow(flags.ListSkippedItemsFV),
|
||||||
!ifShow(flags.ListRecoveredErrorsFV))
|
!ifShow(flags.ListRecoveredErrorsFV))
|
||||||
|
|
||||||
|
|||||||
@ -12,9 +12,11 @@ func AddAllBackupListFlags(cmd *cobra.Command) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func AddFailedItemsFN(cmd *cobra.Command) {
|
func AddFailedItemsFN(cmd *cobra.Command) {
|
||||||
cmd.Flags().StringVar(
|
fs := cmd.Flags()
|
||||||
&ListFailedItemsFV, FailedItemsFN, Show,
|
fs.StringVar(
|
||||||
|
&FailedItemsFV, FailedItemsFN, Show,
|
||||||
"Toggles showing or hiding the list of items that failed.")
|
"Toggles showing or hiding the list of items that failed.")
|
||||||
|
cobra.CheckErr(fs.MarkHidden(FailedItemsFN))
|
||||||
}
|
}
|
||||||
|
|
||||||
func AddSkippedItemsFN(cmd *cobra.Command) {
|
func AddSkippedItemsFN(cmd *cobra.Command) {
|
||||||
|
|||||||
@ -17,9 +17,9 @@ const (
|
|||||||
FailFastFN = "fail-fast"
|
FailFastFN = "fail-fast"
|
||||||
FailedItemsFN = "failed-items"
|
FailedItemsFN = "failed-items"
|
||||||
FetchParallelismFN = "fetch-parallelism"
|
FetchParallelismFN = "fetch-parallelism"
|
||||||
|
NoPermissionsFN = "no-permissions"
|
||||||
NoStatsFN = "no-stats"
|
NoStatsFN = "no-stats"
|
||||||
RecoveredErrorsFN = "recovered-errors"
|
RecoveredErrorsFN = "recovered-errors"
|
||||||
NoPermissionsFN = "no-permissions"
|
|
||||||
RunModeFN = "run-mode"
|
RunModeFN = "run-mode"
|
||||||
SkippedItemsFN = "skipped-items"
|
SkippedItemsFN = "skipped-items"
|
||||||
SkipReduceFN = "skip-reduce"
|
SkipReduceFN = "skip-reduce"
|
||||||
@ -35,17 +35,17 @@ var (
|
|||||||
ForceItemDataDownloadFV bool
|
ForceItemDataDownloadFV bool
|
||||||
EnableImmutableIDFV bool
|
EnableImmutableIDFV bool
|
||||||
FailFastFV bool
|
FailFastFV bool
|
||||||
|
FailedItemsFV string
|
||||||
FetchParallelismFV int
|
FetchParallelismFV int
|
||||||
ListAlertsFV string
|
ListAlertsFV string
|
||||||
ListFailedItemsFV string
|
|
||||||
ListSkippedItemsFV string
|
ListSkippedItemsFV string
|
||||||
ListRecoveredErrorsFV string
|
ListRecoveredErrorsFV string
|
||||||
|
NoPermissionsFV bool
|
||||||
NoStatsFV bool
|
NoStatsFV bool
|
||||||
// RunMode describes the type of run, such as:
|
// RunMode describes the type of run, such as:
|
||||||
// flagtest, dry, run. Should default to 'run'.
|
// flagtest, dry, run. Should default to 'run'.
|
||||||
RunModeFV string
|
RunModeFV string
|
||||||
NoPermissionsFV bool
|
SkipReduceFV bool
|
||||||
SkipReduceFV bool
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// well-known flag values
|
// well-known flag values
|
||||||
|
|||||||
2
src/cli/flags/testdata/backup_list.go
vendored
2
src/cli/flags/testdata/backup_list.go
vendored
@ -20,7 +20,7 @@ func PreparedBackupListFlags() []string {
|
|||||||
|
|
||||||
func AssertBackupListFlags(t *testing.T, cmd *cobra.Command) {
|
func AssertBackupListFlags(t *testing.T, cmd *cobra.Command) {
|
||||||
assert.Equal(t, flags.Show, flags.ListAlertsFV)
|
assert.Equal(t, flags.Show, flags.ListAlertsFV)
|
||||||
assert.Equal(t, flags.Show, flags.ListFailedItemsFV)
|
assert.Equal(t, flags.Show, flags.FailedItemsFV)
|
||||||
assert.Equal(t, flags.Show, flags.ListSkippedItemsFV)
|
assert.Equal(t, flags.Show, flags.ListSkippedItemsFV)
|
||||||
assert.Equal(t, flags.Show, flags.ListRecoveredErrorsFV)
|
assert.Equal(t, flags.Show, flags.ListRecoveredErrorsFV)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,13 +53,15 @@ require (
|
|||||||
gotest.tools/v3 v3.5.1
|
gotest.tools/v3 v3.5.1
|
||||||
)
|
)
|
||||||
|
|
||||||
require github.com/emersion/go-vcard v0.0.0-20230815062825-8fda7d206ec9
|
require (
|
||||||
|
github.com/arran4/golang-ical v0.2.3
|
||||||
|
github.com/emersion/go-vcard v0.0.0-20230815062825-8fda7d206ec9
|
||||||
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/VividCortex/ewma v1.2.0 // indirect
|
github.com/VividCortex/ewma v1.2.0 // indirect
|
||||||
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
|
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
|
||||||
github.com/andybalholm/brotli v1.0.6 // indirect
|
github.com/andybalholm/brotli v1.0.6 // indirect
|
||||||
github.com/arran4/golang-ical v0.2.3 // indirect
|
|
||||||
github.com/aws/aws-sdk-go v1.48.6 // indirect
|
github.com/aws/aws-sdk-go v1.48.6 // indirect
|
||||||
github.com/cention-sany/utf7 v0.0.0-20170124080048-26cad61bd60a // indirect
|
github.com/cention-sany/utf7 v0.0.0-20170124080048-26cad61bd60a // indirect
|
||||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user