<#1064 fix: surface actionable error when docker i...
# flyte-github
a
#1064 fix: surface actionable error when docker is missing for image build Pull request opened by EngHabu Summary •
DockerImageBuilder._ensure_buildx_builder
shells out to
subprocess.run(["docker", "buildx", "version"])
and only catches
CalledProcessError
. If docker isn't installed at all, the call raises
FileNotFoundError: [Errno 2] No such file or directory: 'docker'
, which bubbles all the way up to Sentry as an unhandled SDK crash. • Catch
FileNotFoundError
explicitly and raise
ImageBuildError
(the user-facing error type the CLI already special-cases) with a message that tells the user docker isn't on PATH, links the install instructions, and points at the remote builder as the no-local-docker escape hatch. Sentry issues Fixes FLYTE-SDK-2K Test plan • New regression test
test_ensure_buildx_builder_raises_image_build_error_when_docker_missing
monkey-patches
subprocess.run
to raise
FileNotFoundError
and asserts the new
ImageBuildError
is raised flyteorg/flyte-sdk