-
Notifications
You must be signed in to change notification settings - Fork 499
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
refine export cleaner #2916
refine export cleaner #2916
Conversation
@@ -67,7 +68,7 @@ func (bo *Options) cleanRemoteBackupData(bucket string, opts []string) error { | |||
destBucket := util.NormalizeBucketURI(bucket) | |||
args := util.ConstructArgs(constants.RcloneConfigArg, opts, "deletefile", destBucket, "") | |||
output, err := exec.Command("rclone", args...).CombinedOutput() | |||
if err != nil { | |||
if err != nil && !strings.Contains(err.Error(), "doesn't exist") { |
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.
does rclone
document its exit codes?
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.
checking the error string is fragile, can we use the exit codes documented here?
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.
checking the error string is fragile, can we use the exit codes documented here?
nice advise! I will take a try
/test pull-e2e-kind-serial |
/test pull-e2e-kind-serial |
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.
LGTM
/test pull-e2e-kind-serial |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-1.1 in PR #2924 |
Signed-off-by: ti-srebot <[email protected]> Co-authored-by: Chunzhu Li <[email protected]>
What problem does this PR solve?
fix #2914
What is changed and how does it work?
when rclone meet
doesn't exist
error, make cleaner just ignore it.Check List
Tests
test delete BR and dumpling's backup file and then delete backup CR.
Related changes
Does this PR introduce a user-facing change?: