Skip to content

Commit f1d973f

Browse files
committed
Makes BackupKeyspaceSchema return an error on failure
Ran into an issue where a coworker had introduced some s3 bucket policies that strictly enforced encryption headers. They weren't required because the backup bucket had default server-side encryption enabled and the aws sdk took care of all of that on the backend. However, since this return block did not include the error, the app kept on rolling into the copy step and we were getting 404 errors in the logs because the entire path prefix had been wiped out because of this return. Took me all day to narrow down so thought I'd PR this to save someone else the headache if they ever run into this issue.
1 parent be0e30d commit f1d973f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cain/cqlsh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func BackupKeyspaceSchema(iK8sClient, iDstClient interface{}, namespace, pod, co
2929

3030
reader := bytes.NewReader(schema)
3131
if err := skbn.Upload(iDstClient, dstPrefix, schemaToPath, "", reader); err != nil {
32-
return "", nil
32+
return "", err
3333
}
3434

3535
return dstBasePath, nil

0 commit comments

Comments
 (0)