Skip to content

Fix ECR repository URL replacement for LocalStack 3.4 compatibility #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MiguelBCosta
Copy link

As mentioned in PR #20, LocalStack version 3.4 introduced the ECR_ENDPOINT_STRATEGY variable, which changed how ECR endpoints are generated. This update affected the current domain replacement logic, resulting in invalid image repository names when using LocalStack’s ECR.

For example:

  • Correct image name:
    000000000000.dkr.ecr.us-east-1.amazonaws.com/sample5e8ff9bf/samplefunction757ff6efrepo

  • Endpoint returned by LocalStack:
    000000000000.dkr.ecr.us-east-1.localhost.localstack.cloud:4566/sample5e8ff9bf/samplefunction757ff6efrepo

  • Incorrect result after the current replace:
    000000000000.dkr.ecr.us-east-1.000000000000.dkr.ecr.us-east-1.localhost.localstack.cloud:4566/sample5e8ff9bf/samplefunction757ff6efrepo

  • Expected result after replace:
    000000000000.dkr.ecr.us-east-1.localhost.localstack.cloud:4566/sample5e8ff9bf/samplefunction757ff6efrepo

This incorrect replacement causes a "repository not found" error when uploading the image to the local ECR.

This PR updates the domain replacement logic to ensure compatibility with the changes introduced in LocalStack 3.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants