acoustic-carpenter-78188
06/02/2026, 11:55 PMCopyConfig.validate() raised a bare ValueError when an image's source path is missing or the wrong type (e.g. a stale add_source(...) path pointing at a build dir that no longer exists). That escaped into the SDK's Sentry project as an SDK crash, even though a bad source path is a user mistake in the image spec.
Fix
In src/flyte/_image.py:CopyConfig.validate, raise flyte.errors.ImageBuildError (a RuntimeUserError already filtered by flyte/_sentry.py:_is_user_error) for the three validation failures (missing path, not-a-directory, not-a-file). Messages are unchanged. No caller catches ValueError around this path (verified), and ImageBuildError is still a RuntimeError subclass.
Closes
⢠FLYTE-SDK-4D ā ValueError: Source folder /.../deploy/build/release/sandbox-server does not exist.
fixes FLYTE-SDK-4D
Tests
⢠Added test_copy_config_validate_missing_src_raises_image_build_error and test_copy_config_validate_wrong_type_raises_image_build_error.
š¤ Generated with Claude Code
flyteorg/flyte-sdkacoustic-carpenter-78188
06/03/2026, 2:29 PM