Skip to content

Flow Deploy not recognize build context #17534

@thdtt

Description

@thdtt

Bug summary

My code:

if __name__ == '__main__':
    my_flow.deploy(
        name="test",
        work_pool_name="my-docker-pool",
        image=DockerImage(
            name="test",
            tag="latest",
            context=get_project_path()        # it should use the path I've set
        ),
        push=True,
        cron="0 * * * *",
    )

When set context on DockerImage, prefect not recognize context path, but always use directory where the file exist so that many modules cannot be recognized

Version info

Version:             3.2.13
API version:         0.8.4
Python version:      3.12.0
Git commit:          12800297
Built:               Fri, Mar 14, 2025 8:37 PM
OS/Arch:             darwin/arm64
Profile:             ephemeral
Server type:         server
Pydantic version:    2.10.6

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