localstack-core 4.13.2.dev88__py3-none-any.whl → 4.13.2.dev89__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- localstack/services/s3/provider.py +44 -6
- localstack/version.py +2 -2
- {localstack_core-4.13.2.dev88.dist-info → localstack_core-4.13.2.dev89.dist-info}/METADATA +1 -1
- {localstack_core-4.13.2.dev88.dist-info → localstack_core-4.13.2.dev89.dist-info}/RECORD +9 -9
- {localstack_core-4.13.2.dev88.data → localstack_core-4.13.2.dev89.data}/scripts/localstack-supervisor +0 -0
- {localstack_core-4.13.2.dev88.dist-info → localstack_core-4.13.2.dev89.dist-info}/WHEEL +0 -0
- {localstack_core-4.13.2.dev88.dist-info → localstack_core-4.13.2.dev89.dist-info}/entry_points.txt +0 -0
- {localstack_core-4.13.2.dev88.dist-info → localstack_core-4.13.2.dev89.dist-info}/licenses/LICENSE.txt +0 -0
- {localstack_core-4.13.2.dev88.dist-info → localstack_core-4.13.2.dev89.dist-info}/top_level.txt +0 -0
|
@@ -1513,6 +1513,25 @@ class S3Provider(S3Api, ServiceLifecycleHook):
|
|
|
1513
1513
|
# request_payer: RequestPayer = None, # TODO:
|
|
1514
1514
|
dest_bucket = request["Bucket"]
|
|
1515
1515
|
dest_key = request["Key"]
|
|
1516
|
+
|
|
1517
|
+
if_match = request.get("IfMatch")
|
|
1518
|
+
if_none_match = request.get("IfNoneMatch")
|
|
1519
|
+
|
|
1520
|
+
if if_none_match and if_match:
|
|
1521
|
+
raise NotImplementedException(
|
|
1522
|
+
"A header you provided implies functionality that is not implemented",
|
|
1523
|
+
Header="If-Match,If-None-Match",
|
|
1524
|
+
additionalMessage="Multiple conditional request headers present in the request",
|
|
1525
|
+
)
|
|
1526
|
+
|
|
1527
|
+
elif (if_none_match and if_none_match != "*") or (if_match and if_match == "*"):
|
|
1528
|
+
header_name = "If-None-Match" if if_none_match else "If-Match"
|
|
1529
|
+
raise NotImplementedException(
|
|
1530
|
+
"A header you provided implies functionality that is not implemented",
|
|
1531
|
+
Header=header_name,
|
|
1532
|
+
additionalMessage=f"We don't accept the provided value of {header_name} header for this API",
|
|
1533
|
+
)
|
|
1534
|
+
|
|
1516
1535
|
validate_object_key(dest_key)
|
|
1517
1536
|
store, dest_s3_bucket = self._get_cross_account_bucket(context, dest_bucket)
|
|
1518
1537
|
|
|
@@ -1615,6 +1634,12 @@ class S3Provider(S3Api, ServiceLifecycleHook):
|
|
|
1615
1634
|
system_metadata = src_s3_object.system_metadata
|
|
1616
1635
|
|
|
1617
1636
|
dest_version_id = generate_version_id(dest_s3_bucket.versioning_status)
|
|
1637
|
+
if dest_version_id != "null":
|
|
1638
|
+
# if we are in a versioned bucket, we need to lock around the full key (all the versions)
|
|
1639
|
+
# because object versions have locks per version
|
|
1640
|
+
precondition_lock = self._preconditions_locks[dest_bucket][dest_key]
|
|
1641
|
+
else:
|
|
1642
|
+
precondition_lock = contextlib.nullcontext()
|
|
1618
1643
|
|
|
1619
1644
|
encryption_parameters = get_encryption_parameters_from_request_and_bucket(
|
|
1620
1645
|
request,
|
|
@@ -1654,12 +1679,25 @@ class S3Provider(S3Api, ServiceLifecycleHook):
|
|
|
1654
1679
|
owner=dest_s3_bucket.owner,
|
|
1655
1680
|
)
|
|
1656
1681
|
|
|
1657
|
-
with
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1682
|
+
with (
|
|
1683
|
+
precondition_lock,
|
|
1684
|
+
self._storage_backend.copy(
|
|
1685
|
+
src_bucket=src_bucket,
|
|
1686
|
+
src_object=src_s3_object,
|
|
1687
|
+
dest_bucket=dest_bucket,
|
|
1688
|
+
dest_object=s3_object,
|
|
1689
|
+
) as s3_stored_object,
|
|
1690
|
+
):
|
|
1691
|
+
# Check destination write preconditions inside the lock to prevent race conditions.
|
|
1692
|
+
if if_none_match and object_exists_for_precondition_write(dest_s3_bucket, dest_key):
|
|
1693
|
+
raise PreconditionFailed(
|
|
1694
|
+
"At least one of the pre-conditions you specified did not hold",
|
|
1695
|
+
Condition="If-None-Match",
|
|
1696
|
+
)
|
|
1697
|
+
|
|
1698
|
+
elif if_match:
|
|
1699
|
+
verify_object_equality_precondition_write(dest_s3_bucket, dest_key, if_match)
|
|
1700
|
+
|
|
1663
1701
|
s3_object.checksum_value = s3_stored_object.checksum or src_s3_object.checksum_value
|
|
1664
1702
|
s3_object.etag = s3_stored_object.etag or src_s3_object.etag
|
|
1665
1703
|
|
localstack/version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '4.13.2.
|
|
32
|
-
__version_tuple__ = version_tuple = (4, 13, 2, '
|
|
31
|
+
__version__ = version = '4.13.2.dev89'
|
|
32
|
+
__version_tuple__ = version_tuple = (4, 13, 2, 'dev89')
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -4,7 +4,7 @@ localstack/deprecations.py,sha256=-3IYgCd6LEC3PjO7hbr3Dg-p0PIS6phjmv1qZnj1uo0,15
|
|
|
4
4
|
localstack/openapi.yaml,sha256=jFUzv-NKkJttxb8HRrmKiNYOmJD-zVfPxG3DDMrRwfg,30865
|
|
5
5
|
localstack/plugins.py,sha256=BIJC9dlo0WbP7lLKkCiGtd_2q5oeqiHZohvoRTcejXM,2457
|
|
6
6
|
localstack/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
localstack/version.py,sha256=
|
|
7
|
+
localstack/version.py,sha256=LuEd6b-xI2Fqw-Y4NrhlVLfU3XidlA99hDfvlDvpIMw,721
|
|
8
8
|
localstack/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
localstack/aws/accounts.py,sha256=102zpGowOxo0S6UGMpfjw14QW7WCLVAGsnFK5xFMLoo,3043
|
|
10
10
|
localstack/aws/app.py,sha256=n9bJCfJRuMz_gLGAH430c3bIQXgUXeWO5NPfcdL2MV8,5145
|
|
@@ -690,7 +690,7 @@ localstack/services/s3/headers.py,sha256=jh0R2vhdnB5pWiVCoV26kqup53dBWz3iQIE3mhP
|
|
|
690
690
|
localstack/services/s3/models.py,sha256=EwywhCScxHnbbbwM_Zp5x5rJMsy4Uf7CpvO1LaDj18k,31315
|
|
691
691
|
localstack/services/s3/notifications.py,sha256=JRvZTs3YpEXX-tPdliarVKjKsp42fdzrTNOC51y2-8I,32568
|
|
692
692
|
localstack/services/s3/presigned_url.py,sha256=rAp8JdscT8ND4qxaHjSsfibEjEvPJ3CIVI0hwHDyJcA,38868
|
|
693
|
-
localstack/services/s3/provider.py,sha256=
|
|
693
|
+
localstack/services/s3/provider.py,sha256=BLyYbrlxYerLRjHj9tZJD3XOmpPV-cbUW6AjisgoOVo,203611
|
|
694
694
|
localstack/services/s3/utils.py,sha256=yRE4P_ULUIt4WxU55WtIkxj584lObisjolzPKtlIYnM,44432
|
|
695
695
|
localstack/services/s3/validation.py,sha256=KPs960rBpUOK9Ui3TqPubqT7t2PNox8l5vRP9U-o9CE,20539
|
|
696
696
|
localstack/services/s3/website_hosting.py,sha256=I4cE7omiN7EBQjdlvueSb_DaD8cwEZxeh7K-H_We30k,16672
|
|
@@ -1311,10 +1311,10 @@ localstack/utils/server/tcp_proxy.py,sha256=y2NJAmvftTiAYsLU_8qe4W5LGqwUw21i90Pu
|
|
|
1311
1311
|
localstack/utils/xray/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1312
1312
|
localstack/utils/xray/trace_header.py,sha256=ahXk9eonq7LpeENwlqUEPj3jDOCiVRixhntQuxNor-Q,6209
|
|
1313
1313
|
localstack/utils/xray/traceid.py,sha256=GKO-R2sMMjlrH2UaLPXlQlZ6flbE7ZKb6IZMtMu_M5U,1110
|
|
1314
|
-
localstack_core-4.13.2.
|
|
1315
|
-
localstack_core-4.13.2.
|
|
1316
|
-
localstack_core-4.13.2.
|
|
1317
|
-
localstack_core-4.13.2.
|
|
1318
|
-
localstack_core-4.13.2.
|
|
1319
|
-
localstack_core-4.13.2.
|
|
1320
|
-
localstack_core-4.13.2.
|
|
1314
|
+
localstack_core-4.13.2.dev89.data/scripts/localstack-supervisor,sha256=nm1Il2d6ASyOB6Vo4CRHd90w7TK9FdRl9VPp0NN6hUk,6378
|
|
1315
|
+
localstack_core-4.13.2.dev89.dist-info/licenses/LICENSE.txt,sha256=3PC-9Z69UsNARuQ980gNR_JsLx8uvMjdG6C7cc4LBYs,606
|
|
1316
|
+
localstack_core-4.13.2.dev89.dist-info/METADATA,sha256=qmqG6Gc2ckzPlbS4cA0icer59NQ6NRDyMAnUq7d5WcE,5867
|
|
1317
|
+
localstack_core-4.13.2.dev89.dist-info/WHEEL,sha256=YCfwYGOYMi5Jhw2fU4yNgwErybb2IX5PEwBKV4ZbdBo,91
|
|
1318
|
+
localstack_core-4.13.2.dev89.dist-info/entry_points.txt,sha256=59aAnn8KVHWAHkMg2dOgmgYtRZ-xTX9T4UiIchWgK6k,20975
|
|
1319
|
+
localstack_core-4.13.2.dev89.dist-info/top_level.txt,sha256=3sqmK2lGac8nCy8nwsbS5SpIY_izmtWtgaTFKHYVHbI,11
|
|
1320
|
+
localstack_core-4.13.2.dev89.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{localstack_core-4.13.2.dev88.dist-info → localstack_core-4.13.2.dev89.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{localstack_core-4.13.2.dev88.dist-info → localstack_core-4.13.2.dev89.dist-info}/top_level.txt
RENAMED
|
File without changes
|