Skip to content

Commit c7dcc7d

Browse files
Fix ECR repository URL replacement for LocalStack 3.4 compatibility (#26)
Co-authored-by: Simon Walker <simon.walker@localstack.cloud>
1 parent 3bff5df commit c7dcc7d

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ samlocal --help
2626

2727
## Change Log
2828

29+
* v1.70.1: Fix ECR repository rewrite logic
2930
* v1.70.0: Fix regex pattern to detect ECR URLs with dashes
3031
* v1.69.0: Fix repo related cli options and add support to Lambdas with `Image` type
3132
* v1.68.0: Support `AWS_ENDPOINT_URL` for configuring the `boto3.client` endpoint

bin/samlocal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def upload(self, image, resource_name):
9292
ecr_endpoint = get_registry_url(self)
9393
ecr_repo = self.ecr_repo_multi.get(resource_name)
9494
if ecr_repo and "amazonaws.com" in ecr_repo:
95-
self.ecr_repo_multi[resource_name] = ecr_repo.replace("amazonaws.com", ecr_endpoint)
95+
self.ecr_repo_multi[resource_name] = f'{ecr_endpoint}/{ecr_repo.split("/",1)[1]}'
9696
except (AttributeError, TypeError):
9797
pass
9898
return upload_orig(self, image, resource_name)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import re
44
from setuptools import find_packages, setup
55

6-
VERSION = '1.70.0'
6+
VERSION = '1.70.1'
77

88
# parameter variables
99
install_requires = []

0 commit comments

Comments
 (0)