From 273269ef1b6c524a017cb4b837d76190014938a0 Mon Sep 17 00:00:00 2001 From: Raphael Randschau Date: Fri, 28 Oct 2022 08:40:59 -0700 Subject: [PATCH] allow e2e test image to be changed via env variable (#15200) as we patch our base images, this e2e image needs to be updated all the time as well. Instead of changing this with a PR all the time this PR makes the e2e container image version configurable through the ENV. Co-authored-by: Jirka --- tests/tests_app_examples/custom_work_dependencies/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/tests_app_examples/custom_work_dependencies/app.py b/tests/tests_app_examples/custom_work_dependencies/app.py index 53a8348a83..d658b76b35 100644 --- a/tests/tests_app_examples/custom_work_dependencies/app.py +++ b/tests/tests_app_examples/custom_work_dependencies/app.py @@ -24,7 +24,8 @@ class WorkWithCustomBaseImage(LightningWork): def __init__(self, cloud_compute: CloudCompute = CloudCompute(), **kwargs): # this image has been created from ghcr.io/gridai/base-images:v1.8-cpu # by just adding an empty file at /content/.e2e_test - custom_image = "ghcr.io/gridai/image-for-testing-custom-images-in-e2e:v1.12" + image_tag = os.getenv("LIGHTNING_E2E_TEST_IMAGE_VERSION", "v0.0.1") + custom_image = f"ghcr.io/gridai/image-for-testing-custom-images-in-e2e:{image_tag}" build_config = BuildConfig(image=custom_image) super().__init__(parallel=True, **kwargs, cloud_compute=cloud_compute, cloud_build_config=build_config)