Skip to content

Commit 7fa1df5

Browse files
committed
fix: workaround for boto3 checksum bug
1 parent 6cc6037 commit 7fa1df5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

services/staging/rs_server_staging/processors.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,12 @@ def set_dask_env(host_env: dict):
755755
for name in ["S3_ACCESSKEY", "S3_SECRETKEY", "S3_ENDPOINT", "S3_REGION"]:
756756
os.environ[name] = host_env[name]
757757

758+
# Some kind of workaround for boto3 to avoid checksum being added inside
759+
# the file contents uploaded to the s3 bucket e.g. x-amz-checksum-crc32:xxx
760+
# See: https://github.com/boto/boto3/issues/4435
761+
os.environ["AWS_REQUEST_CHECKSUM_CALCULATION"] = "when_required"
762+
os.environ["AWS_RESPONSE_CHECKSUM_VALIDATION"] = "when_required"
763+
758764
client.run(set_dask_env, os.environ)
759765

760766
# This is a temporary fix for the dask cluster settings which does not create a scheduler by default

0 commit comments

Comments
 (0)