Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rdb): fix argument parsing in backup wait #1430

Merged
merged 3 commits into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

EXAMPLES:
Wait for a backup to reach a stable state
scw rdb backup wait
scw rdb backup wait 11111111-1111-1111-1111-111111111111

ARGS:
backup-id ID of the backup you want to wait for.
Expand Down
6 changes: 3 additions & 3 deletions internal/namespaces/rdb/v1/custom_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ var (
)

type backupWaitRequest struct {
DatabaseBackupID string
Region scw.Region
BackupID string
Region scw.Region
}

func backupWaitCommand() *core.Command {
Expand All @@ -50,7 +50,7 @@ func backupWaitCommand() *core.Command {
Run: func(ctx context.Context, argsI interface{}) (i interface{}, err error) {
api := rdb.NewAPI(core.ExtractClient(ctx))
return api.WaitForDatabaseBackup(&rdb.WaitForDatabaseBackupRequest{
DatabaseBackupID: argsI.(*backupWaitRequest).DatabaseBackupID,
DatabaseBackupID: argsI.(*backupWaitRequest).BackupID,
Region: argsI.(*backupWaitRequest).Region,
Timeout: scw.TimeDurationPtr(backupActionTimeout),
RetryInterval: core.DefaultRetryInterval,
Expand Down