8000 Flow engine does not execute pull steps when loading flow from flow run · Issue #18138 · PrefectHQ/prefect · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Flow engine does not execute pull steps when loading flow from flow run #18138
Open
< 857A /div>
@GalLadislav

Description

@GalLadislav

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:

async def load_flow_from_flow_run(

and more precisely to this section:

if ":" not in deployment.entrypoint:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0