<#1967 Do not check if image builder exists in the...
# flyte-github
a
#1967 Do not check if image builder exists in the dynamic task Pull request opened by pingsutw TL;DR There is an error when using imageSpec for dynamic task.

image▾

The builder should only be checked if the image does not exist Type ☑︎ Bug Fix ☐ Feature ☐ Plugin Are all requirements met? ☑︎ Code completed ☑︎ Smoke tested ☐ Unit tests added ☐ Code documentation added ☐ Any pending items have an associated Issue Complete description
Copy code
from flytekit import ImageSpec, task, dynamic, workflow

new_flytekit = "git+https://github.com/flyteorg/flytekit.git@90c7750b99d53b44dd92633fb8225b3bed51fb21"
repro_img = ImageSpec(
    name="repro",
    apt_packages=["curl", "git"],
    packages=[new_flytekit],
    registry="pingsutw",
)


@task(container_image=repro_img)
def foo():
    print("foo")


@dynamic(container_image=repro_img)
def bar():
    foo()


@workflow
def wf():
    bar()


if __name__ == '__main__':
    wf()
Tracking Issue https://github.com/flyteorg/flyte/issues/ Follow-up issue NA flyteorg/flytekit Codecov: 62.62% (-0.07%) compared to 80a4482 Codecov: 0.00% of diff hit (target 62.69%) ✅ 28 other checks have passed 28/30 successful checks