Hi I think the flytekit noop builder has a bug: - ...
# flyte-support
r
Hi I think the flytekit noop builder has a bug: • if the environment launching the flyte workflow does not have docker available, then
image_spec.exist()
will be
None
and
should_build
goes to `False`: https://github.com/flyteorg/flytekit/blob/eb5a67f76aaef96a44bde04afb72b87592cc8b7a/flytekit/image_spec/image_spec.py#L479 • except the
noop
builder relies on
should_build
being
True
in order to effectively overwrite the image name: https://github.com/flyteorg/flytekit/blob/eb5a67f76aaef96a44bde04afb72b87592cc8b7a/flytekit/image_spec/noop_builder.py#L9 Thus
noop
builder will never work as intended if the launching shell does not have
docker
available. I think that's not as intended, because the
noop
builder is meant to essentially skip docker (and so ideally would work as intended if the user environment does not have docker available eh?)
A quick fix, at least for me, is for
NoOpBuilder
to override
should_build
and make it always return
True
. IDK this seems conceptually correct because for no-op builder, the build is a "no-op" and thus can "always happen" and the net effect is to provide the correct / intended image name.
f
@rapid-artist-48509 I think you might be right. The
NoOpBuilder
should override
should_build
to always return True in order to correctly overwrite the image name. Let me talk to the community.
r
👍 yay thank you!
f
Hi @rapid-artist-48509, I’ve opened an issue for this after discussing with the community. Would you be interested in submitting a PR?
r
thank you @faint-pilot-24699! It would be difficult for me to get auth from my job to do a PR, so I cannot pursue that right now. But in my own testing, when I subclassed the no-op builder with a
should_build
that just returns True, then stuff works as expected
👍 1
super fast thank you @faint-pilot-24699! https://github.com/flyteorg/flytekit/pull/3311
👍 1