acoustic-carpenter-78188
06/17/2026, 7:45 AMImage.from_*().with_local_v2(), the locally-built flyte wheel can be silently replaced by the published PyPI release. A user modifying flyte locally ends up running the released version in the image without any error.
PythonWheelHandler.handle emits two uv pip install steps for a PythonWheels layer:
1. force-install the local wheel: --no-deps --no-index --reinstall flyte
2. resolve dependencies from the index: --find-links /dist flyte
The problem is the order: the dependency step runs last and does a full resolve of flyte. If the local wheel can't be fully satisfied during that resolve — most commonly when a dev wheel pins a dependency version that isn't published yet (e.g. after rebasing onto a branch that bumped an internal dep) — uv backtracks and installs the highest satisfiable version, i.e. the stable PyPI release. The result silently undoes step 1:
#19 - flyte==2.5.2.dev1+g512b21d95.d20260617
#19 + flyte==2.5.1
Note this is not specific to the --find-links that was recently added to step 2 — old and new code backtrack identically. The fix is structural.
What
Swap the order so the dependency step runs first and the force-install step runs last. Because the force-install uses --no-index --reinstall, it can't be re-resolved away, so the exact local wheel is always the final state regardless of what the resolver picks for the package itself.
• Dependencies still come from the index (resolved in the first step).
• Packages not published to PyPI (local plugin wheels) still resolve via --find-links /dist in the first step.
• with_local_v2() now always installs exactly the local wheel.
Trade-off: the local wheel is force-installed with --no-deps, so a genuinely-missing dependency now surfaces at runtime (ImportError) instead of being masked by silently running the older published package. This is the intended behavior for with_local_v2() — you get your local code.
Repro / verification
With a local dev wheel whose declared dependency can't be satisfied, the pre-fix sequence downgrades to the PyPI release; the reordered sequence keeps the local wheel:
[A] uv pip install --find-links /dist flyte -> picks stable + deps
[B] uv pip install --no-deps --no-index --reinstall --find-links /dist flyte -> local dev wheel (final)
Tests
Added test_python_wheel_handler_forces_local_wheel_last asserting the force-install step (--no-index --reinstall) is emitted after the dependency step in the generated Dockerfile.
flyteorg/flyte-sdkacoustic-carpenter-78188
06/18/2026, 7:31 PM