acoustic-carpenter-78188
07/30/2026, 8:01 AMruff analyze graph so that lazily and conditionally imported local modules get bundled. However, ruff is not a dependency of flyte and with it not preinstalled, flyte would fallback to the runtime sys.modules discovery method.
The fallback was also silent (logger.debug), so there was no signal that the bundle might be incomplete. The failure only shows up later, on the cluster, as a ModuleNotFoundError with nothing pointing back at the cause.
Changes
ruff stays out of the dependency tree and users who want the behavior install it themselves. This PR makes that choice discoverable by users.
• logger.debug → logger.info, naming the consequence and the remedy:
ruff not found on PATH: lazily and conditionally imported local modules may be omitted from the code bundle, surfacing on the cluster as ModuleNotFoundError. Install ruff (•) to include them.pip install ruff
@lru_cache on _ruff_is_available() so the PATH lookup and the notice happen once per process rather than once per bundle.
This prevents the cause of ModuleNotFoundError on cluster from being silent and hard to trace back.
flyteorg/flyte-sdk