acoustic-carpenter-78188
02/24/2026, 9:47 PM--root-dir src, the same module gets imported twice under different names (my_module.envs and src.my_module.envs), creating two distinct TaskEnvironment objects with the same name. This produces a cryptic "Duplicate environment name" error with no guidance on the cause.
This PR:
1. Improves the error messages in _deploy.py to explain the dual-import root cause and suggest passing --root-dir src
2. Adds a new example (examples/project_structures/uv_project_src_layout/) that reproduces the issue
To reproduce with the new example:
cd examples/project_structures/uv_project_src_layout/my_project && uv sync
flyte deploy --dry-run --recursive src/my_module # fails with improved error
flyte deploy --dry-run --recursive --root-dir src src/my_module # succeeds
flyteorg/flyte-sdkacoustic-carpenter-78188
03/04/2026, 2:15 AM