Open
Description
Bug summary
I am using process worker to run deployments with pull steps. When flow run process starts it crashes on ModuleNotFoundError when loading flow from flow run. No pull steps ran prior to that.
My deployment has defined pull steps (from git repository) and entrypoint defined as module path. I am defining my deployment using Python instead of prefect.yaml and deploying using deploy function. Example below:
from myflows import my flow
from prefect.flows import EntrypointType
from prefect.deployments import deploy
from prefect.runner.storage import GitRepository
deployment = flow.to_deployment(
name="MyDeployment",
work_pool_name="default",
concurrency_limit=1,
entrypoint_type=EntrypointType.MODULE_PATH,
)
deployment._storage = GitRepository(url="...")
if __name__ == "__main__":
deploy(
deployment,
work_pool_name="default",
build=False,
push=False,
)
My investigation lead me to here:
Line 2566 in 7d4d416
and more precisely to this section:
Line 2596 in 7d4d416
when an entrypoint is given as module path, it loads the flow without running pull steps first.
Is it possible to run pull steps before that?
Version info
Version: 3.4.2
API version: 0.8.4
Python version: 3.12.10
Git commit: c3c1c119
Built: Mon, May 19, 2025 04:04 PM
OS/Arch: linux/x86_64
Profile: server
Server type: unconfigured
Pydantic version: 2.11.4
Integrations:
prefect-email: 0.4.2
Additional context
No response