Skip to content

Commit ad6e619

Browse files
committed
remove multipart logic for follow-up
1 parent bc8b2b1 commit ad6e619

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

localstack-core/localstack/services/s3/models.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,6 @@ class S3Multipart:
424424
object: S3Object
425425
upload_id: MultipartUploadId
426426
checksum_value: Optional[str]
427-
checksum_type: Optional[ChecksumType]
428427
initiated: datetime
429428
precondition: bool
430429

@@ -435,7 +434,6 @@ def __init__(
435434
expires: Optional[datetime] = None,
436435
expiration: Optional[datetime] = None, # come from lifecycle
437436
checksum_algorithm: Optional[ChecksumAlgorithm] = None,
438-
checksum_type: Optional[ChecksumType] = ChecksumType.COMPOSITE,
439437
encryption: Optional[ServerSideEncryption] = None, # inherit bucket
440438
kms_key_id: Optional[SSEKMSKeyId] = None, # inherit bucket
441439
bucket_key_enabled: bool = False, # inherit bucket
@@ -458,7 +456,6 @@ def __init__(
458456
self.initiator = initiator
459457
self.tagging = tagging
460458
self.checksum_value = None
461-
self.checksum_type = checksum_type
462459
self.precondition = precondition
463460
self.object = S3Object(
464461
key=key,
@@ -468,7 +465,7 @@ def __init__(
468465
expires=expires,
469466
expiration=expiration,
470467
checksum_algorithm=checksum_algorithm,
471-
checksum_type=checksum_type,
468+
checksum_type=ChecksumType.COMPOSITE,
472469
encryption=encryption,
473470
kms_key_id=kms_key_id,
474471
bucket_key_enabled=bucket_key_enabled,

localstack-core/localstack/services/s3/provider.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2096,10 +2096,6 @@ def create_multipart_upload(
20962096
"Checksum algorithm provided is unsupported. Please try again with any of the valid types: [CRC32, CRC32C, SHA1, SHA256]"
20972097
)
20982098

2099-
# TODO: validate the checksum map between COMPOSITE and FULL_OBJECT
2100-
# get value
2101-
checksum_type = request.get("ChecksumType")
2102-
21032099
# TODO: we're not encrypting the object with the provided key for now
21042100
sse_c_key_md5 = request.get("SSECustomerKeyMD5")
21052101
validate_sse_c(
@@ -2126,7 +2122,6 @@ def create_multipart_upload(
21262122
user_metadata=request.get("Metadata"),
21272123
system_metadata=system_metadata,
21282124
checksum_algorithm=checksum_algorithm,
2129-
checksum_type=checksum_type,
21302125
encryption=encryption_parameters.encryption,
21312126
kms_key_id=encryption_parameters.kms_key_id,
21322127
bucket_key_enabled=encryption_parameters.bucket_key_enabled,
@@ -2151,7 +2146,6 @@ def create_multipart_upload(
21512146

21522147
if checksum_algorithm:
21532148
response["ChecksumAlgorithm"] = checksum_algorithm
2154-
response["ChecksumType"] = checksum_type
21552149

21562150
add_encryption_to_response(response, s3_object=s3_multipart.object)
21572151
if sse_c_key_md5:
@@ -2534,7 +2528,6 @@ def complete_multipart_upload(
25342528
# TODO: check this?
25352529
if s3_object.checksum_algorithm:
25362530
response[f"Checksum{s3_object.checksum_algorithm.upper()}"] = s3_object.checksum_value
2537-
response["ChecksumType"] = s3_object.checksum_type
25382531

25392532
if s3_object.expiration:
25402533
response["Expiration"] = s3_object.expiration # TODO: properly parse the datetime
@@ -2655,7 +2648,6 @@ def list_parts(
26552648
response["PartNumberMarker"] = part_number_marker
26562649
if s3_multipart.object.checksum_algorithm:
26572650
response["ChecksumAlgorithm"] = s3_multipart.object.checksum_algorithm
2658-
response["ChecksumType"] = s3_multipart.checksum_type
26592651

26602652
return response
26612653

0 commit comments

Comments
 (0)