Skip to content

Commit

Permalink
package-indexer: disable R2 default integrity check
Browse files Browse the repository at this point in the history
boto3 v1.36.0 introduced a new default integrity
check for S3 operations. This breaks R2's S3
compatibility API, as it does not support
integrity checks.

See
boto/boto3#4392

Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
  • Loading branch information
alltilla committed Feb 3, 2025
1 parent 69ff1ed commit b881af1
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from typing import Any, Dict, List

from boto3 import Session
from botocore.config import Config
from botocore.exceptions import ClientError, EndpointConnectionError

from .remote_storage_synchronizer import RemoteStorageSynchronizer
Expand Down Expand Up @@ -64,9 +65,16 @@ def __init__(self, access_key: str, secret_key: str, endpoint: str, bucket: str)
aws_access_key_id=access_key,
aws_secret_access_key=secret_key,
)
client_config = Config(
client_context_params={
"request_checksum_calculation": "when_required",
"response_checksum_validation": "when_required",
},
)
self.__client = self.__session.client(
service_name="s3",
endpoint_url=endpoint,
config=client_config,
)
self.__bucket = bucket
super().__init__(
Expand Down

0 comments on commit b881af1

Please sign in to comment.