acoustic-carpenter-78188
07/01/2026, 4:09 PMImageBuildEngine._get_builder only handled the string builder names (`local`/`remote`/registered entry-point names). When a caller supplies an already-instantiated builder — e.g. flyte.init(image_builder=ArteraImageBuilder()) — the object was passed to _load_custom_image_builders, where ep.name != <object> never matches, so it fell through to:
ValueError: Unknown image builder type: <artera.flyte_env.image_builder.v2.ArteraImageBuilder object at 0x...>. Available builders: ['artera', 'local', 'remote']
This leaked to Sentry as an SDK crash (FLYTE-SDK-61, on 2.5.7).
Fix
If builder is not a string (and not None), it is already an ImageBuilder instance — return it directly instead of trying to resolve it as an entry-point name. String names keep their existing behavior, and unknown names still raise the clear ValueError.
Tests
• test_get_builder_accepts_instance — an instance is returned as-is.
• test_get_builder_unknown_name_still_raises — unknown string names still raise.
fixes FLYTE-SDK-61
flyteorg/flyte-sdkacoustic-carpenter-78188
07/29/2026, 1:29 AM