diff --git a/flytekit/configuration/__init__.py b/flytekit/configuration/__init__.py index 9630802f45..f6d3304058 100644 --- a/flytekit/configuration/__init__.py +++ b/flytekit/configuration/__init__.py @@ -285,7 +285,7 @@ def validate_image(_: typing.Any, param: str, values: tuple) -> ImageConfig: images.append(img) if default_image is None: - default_image_str = os.environ.get("FLYTE_INTERNAL_IMAGE", DefaultImages.default_image()) + default_image_str = DefaultImages.default_image() default_image = Image.look_up_image_info(DEFAULT_IMAGE_NAME, default_image_str, False) return ImageConfig.create_from(default_image=default_image, other_images=images) diff --git a/flytekit/configuration/default_images.py b/flytekit/configuration/default_images.py index 380f428154..63e02e771d 100644 --- a/flytekit/configuration/default_images.py +++ b/flytekit/configuration/default_images.py @@ -1,4 +1,5 @@ import enum +import os import sys import typing from contextlib import suppress @@ -34,7 +35,8 @@ def default_image(cls) -> str: if default_image is not None: return default_image - return cls.find_image_for() + default_image_str = os.environ.get("FLYTE_INTERNAL_IMAGE", cls.find_image_for()) + return default_image_str @classmethod def find_image_for(