cool-lifeguard-49380
12/06/2023, 3:07 PM@task
def foo() -> str:
return "foo"
@workflow
def wf():
foo().with_overrides(
container_image="{{.image.default.fqn}}:" + "9410d0f0ed4a25577ab35a79bd3eb1119d8627d59c7a8fb947d42ca9fb46a61c"
)
I can in fact specify any version "{{.image.default.fqn}}:" + "non-existent"
and the task in the UI still shows the “default image”.
I saw that there was very recent work fixing container image overrides for map tasks. Could this be broken also for normal tasks? Or am I using it the wrong way?cool-lifeguard-49380
12/06/2023, 3:11 PMtall-lock-23197
tall-lock-23197
glamorous-carpet-83516
12/06/2023, 10:49 PMcool-lifeguard-49380
12/07/2023, 10:44 AMpyflyte run
(which we mostly don’t use) but does not work if we use pyflyte register
and then run from the UI.cool-lifeguard-49380
12/07/2023, 10:45 AMtall-lock-23197
user
12/07/2023, 11:01 AMtall-lock-23197
cool-lifeguard-49380
12/07/2023, 11:12 AMcool-lifeguard-49380
12/07/2023, 11:14 AMcool-lifeguard-49380
12/07/2023, 7:08 PMglamorous-carpet-83516
12/07/2023, 7:37 PMfoo
1. register foo with default image
2. compile the workflow, and register the tasks in the workflow
3. foo already exists, so flytekit won’t register it again
we should compile the workflow first
1. compile the workflow, and register foo with new image in the workflowglamorous-carpet-83516
12/07/2023, 7:40 PMcool-lifeguard-49380
12/07/2023, 8:15 PMpyflyte register
doesn’t work with overrides because of the order in which things are happening?glamorous-carpet-83516
12/07/2023, 10:15 PM@workflow
def wf():
foo().with_overrides(container_image="image1")
foo().with_overrides(container_image="image2")
these two tasks in your workflow will use same image, because flytekit only register one task entity.glamorous-carpet-83516
12/07/2023, 10:17 PMglamorous-carpet-83516
12/07/2023, 10:18 PM@task(container_image="{{.image.default.fqn}}:" + "9410d0f0ed4a25577ab35a79bd3eb1119d8627d59c7a8fb947d42ca9fb46a61c")
def foo() -> str:
return "foo"
@workflow
def wf():
foo()
cool-lifeguard-49380
12/07/2023, 11:25 PMwith_overrides
to run a task with each of them but it sounds like this wouldn’t work because the overriding happens locally before registering. Do you think it would work if we loop over the images, start a dynamic for each and then override the image in there? 🤔cool-lifeguard-49380
12/07/2023, 11:25 PMcool-lifeguard-49380
12/07/2023, 11:26 PMglamorous-carpet-83516
12/07/2023, 11:33 PMglamorous-carpet-83516
12/07/2023, 11:33 PMcool-lifeguard-49380
12/08/2023, 3:00 PMwith_overrides(container_image=…)
together with dynamic @glamorous-carpet-83516. With this workaround, the team that asked me about this is unblocked and can do their experiments … 🙂cool-lifeguard-49380
12/08/2023, 3:03 PM