-
Notifications
You must be signed in to change notification settings - Fork 501
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
http-service: add StopBackup&StopRestore api for http-service #5374
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #5374 +/- ##
==========================================
+ Coverage 61.56% 61.57% +0.01%
==========================================
Files 228 228
Lines 28866 28866
==========================================
+ Hits 17771 17775 +4
+ Misses 9349 9347 -2
+ Partials 1746 1744 -2
|
Signed-off-by: husharp <[email protected]>
Signed-off-by: husharp <[email protected]>
cmd/http-service/server/backup.go
Outdated
// update backup status | ||
_, err = opCli.PingcapV1alpha1().Backups(req.ClusterId).Update(ctx, backup, metav1.UpdateOptions{}) | ||
if err != nil { | ||
logger.Error("Backup not found", zap.Error(err)) | ||
message := fmt.Sprintf("Backup %s not found", req.BackupId) | ||
setResponseStatusCodes(ctx, http.StatusBadRequest) | ||
return &api.StopBackupResp{Success: false, Message: &message}, nil | ||
} |
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.
Can we remove these lines? and also for // update restore status
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.
removed
Signed-off-by: husharp <[email protected]>
What problem does this PR solve?
example for backup:
add backup, status is Scheduled
return success
after backup, status is Stopped
when curl stop again, will return
Backup demo1-full-backup-s3 is already Stopped
What is changed and how does it work?
Code changes
Tests
Release Notes
Please refer to Release Notes Language Style Guide before writing the release note.