Skip to content

Commit

Permalink
Check for restore DB PITR task during the corresponding command (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshitha-yb authored Aug 26, 2024
1 parent 029fe2b commit 3e3cf2e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/cluster/pitr-config/pitr_config_ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ var restorePitrConfigCmd = &cobra.Command{
msg := fmt.Sprintf("The namespace %s in cluster %s is being restored via PITR Configuration.\n\n", formatter.Colorize(namespaceName, formatter.GREEN_COLOR), formatter.Colorize(ClusterName, formatter.GREEN_COLOR))

if viper.GetBool("wait") {
handleTaskCompletion(authApi, clusterID, msg, ybmclient.TASKTYPEENUM_DISABLE_DB_PITR)
handleTaskCompletion(authApi, clusterID, msg, ybmclient.TASKTYPEENUM_RESTORE_DB_PITR)
fmt.Printf("\nSuccessfully restored namespace %s in cluster %s to the snapshot at %d ms.\n\n", namespaceName, ClusterName, restoreAtMilis)
} else {
fmt.Println(msg)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.17.0
github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816
github.com/yugabyte/yugabytedb-managed-go-client-internal v0.0.0-20240820101624-922d1f2cd32c
github.com/yugabyte/yugabytedb-managed-go-client-internal v0.0.0-20240824013428-0810f4c8c85e
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
golang.org/x/mod v0.14.0
golang.org/x/term v0.16.0
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,8 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816 h1:J6v8awz+me+xeb/cUTotKgceAYouhIB3pjzgRd6IlGk=
github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816/go.mod h1:tzym/CEb5jnFI+Q0k4Qq3+LvRF4gO3E2pxS8fHP8jcA=
github.com/yugabyte/yugabytedb-managed-go-client-internal v0.0.0-20240816225228-8a52dc0814f2 h1:2oOycKN1FpcO2E56UAlgwe146J1qv27izT3KmuOBbOE=
github.com/yugabyte/yugabytedb-managed-go-client-internal v0.0.0-20240816225228-8a52dc0814f2/go.mod h1:5vW0xIzIZw+1djkiWKx0qqNmqbRBSf4mjc4qw8lIMik=
github.com/yugabyte/yugabytedb-managed-go-client-internal v0.0.0-20240820101624-922d1f2cd32c h1:a3invyfeWH8gOi7g8EiKcgyZW68CBYiRdODebRsPm70=
github.com/yugabyte/yugabytedb-managed-go-client-internal v0.0.0-20240820101624-922d1f2cd32c/go.mod h1:5vW0xIzIZw+1djkiWKx0qqNmqbRBSf4mjc4qw8lIMik=
github.com/yugabyte/yugabytedb-managed-go-client-internal v0.0.0-20240824013428-0810f4c8c85e h1:G4mKBixpMHHmSW/eLO+Bclu6RwhNmuRKRz4SmkqlTxY=
github.com/yugabyte/yugabytedb-managed-go-client-internal v0.0.0-20240824013428-0810f4c8c85e/go.mod h1:5vW0xIzIZw+1djkiWKx0qqNmqbRBSf4mjc4qw8lIMik=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down

0 comments on commit 3e3cf2e

Please sign in to comment.