File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
localstack_extensions/utils Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 55import requests
66
77from localstack .config import is_env_true
8- from localstack .pro .core .utils .container .registry_strategies import CustomizableRegistryStrategy
98from localstack_extensions .utils .h2_proxy import (
109 apply_http2_patches_for_grpc_support ,
1110)
@@ -104,7 +103,21 @@ def __init__(
104103 http2_ports : list [int ] | None = None ,
105104 tcp_ports : list [int ] | None = None ,
106105 ):
107- self .image_name = CustomizableRegistryStrategy ().resolve (image_name )
106+ from localstack import config as ls_config
107+ from localstack .constants import ENV_PRO_ACTIVATED
108+
109+ pro_activated = is_env_true (ENV_PRO_ACTIVATED )
110+ prefix = ls_config .DOCKER_GLOBAL_IMAGE_PREFIX
111+
112+ if pro_activated :
113+ from localstack .pro .core .utils .container .registry_strategies import CustomizableRegistryStrategy
114+ # CustomizableRegistryStrategy.resolve() has a bug: for images in `name:tag` format
115+ # (no namespace, e.g. `wiremock:3.0`), the colon in parts[0] causes it to treat the
116+ # image as a registry reference and return an invalid result. Normalise first.
117+ self .image_name = CustomizableRegistryStrategy ().resolve (image_name )
118+ else :
119+ self .image_name = image_name
120+
108121 if not container_ports :
109122 raise ValueError ("container_ports is required" )
110123 self .container_ports = container_ports
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " localstack-extensions-utils"
7- version = " 0.1.0 "
7+ version = " 0.1.1 "
88description = " Utility library for LocalStack Extensions"
99readme = {file = " README.md" , content-type = " text/markdown; charset=UTF-8" }
1010requires-python = " >=3.10"
You can’t perform that action at this time.
0 commit comments