acoustic-carpenter-78188
05/07/2026, 5:49 AMCopyConfig is a frozen dataclass with src: Path, but is constructed with str from some call sites (and via deserialization). At runtime update_hash() calls self.src.is_dir() and crashes with AttributeError: 'str' object has no attribute 'is_dir'.
• Coerce src to Path inside __post_init__ (using object.__setattr__ because the dataclass is frozen, matching existing patterns in this file).
Closes
• FLYTE-SDK-11 — AttributeError: 'str' object has no attribute 'is_dir' in flyte._image.update_hash
Test plan
• New unit test in tests/flyte/test_image.py constructs CopyConfig with a string src and asserts both the coerced type and that update_hash runs.
• Existing CopyConfig tests still pass.
🤖 Generated with Claude Code
flyteorg/flyte-sdkacoustic-carpenter-78188
05/08/2026, 6:36 PM