-
Notifications
You must be signed in to change notification settings - Fork 154
feat: add backup detail and refactor backup #112
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
Conversation
arinda-arif
commented
Nov 23, 2021
- change bigquery backup result table name to use timestamp suffix
- add extra information in backup list
- add backup detail sub command
Pull Request Test Coverage Report for Build 1652456122
💛 - Coveralls |
9c27e53 to
0826f63
Compare
4715039 to
9a6a222
Compare
|
Hi @kushsharma, this PR is ready to be reviewed. Need your help on this 🙂 |
api/handler/v1/runtime.go
Outdated
| if !ok { | ||
| return nil, status.Errorf(codes.Internal, "error while parsing backup result: %v", ok) | ||
| } | ||
| results = append(results, backupResult[models.BackupSpecKeyURN].(string)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if models.BackupSpecKeyURN doesn't exist in the backupResult? If it didn't, it will be casted as nil because map kv pair value is of type interface and interface default value will be nil. What if it exists and it can't be cast to string? Both of them will panic and crash the application right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added 2 error catch:
- if
models.BackupSpecKeyURNdoesn't exist in the map - if the value cannot be casted to string
Please check if it is proper enough.