Skip to content

Feature Request: Auto upload local code for remote workers (via --working-dir) #21487

@dragongu

Description

@dragongu

Describe the current behavior

In remote-worker mode, worker machines cannot access the deploy client's local path.
Users must manually package/upload code to shared storage first, then configure pull steps.

This creates operational friction, especially for teams migrating from Ray workflows (ray job submit) where local code submission is typically one step.

Describe the proposed behavior

When deploying to remote workers, support an opt-in flow based on --working-dir:

prefect deploy ./flows/my_flow.py:my_flow \
  --name my-flow \
  --pool remote-pool \
  --working-dir /opt/prefect/flows

Behavior:

  • Prefect automatically packages/uploads local code to configured shared storage.
  • Deployment automatically gets pull metadata and working directory.
  • Worker pulls and runs directly.

Storage location/credentials should be configured in Prefect server and worker startup config, so end users do not need to manage upload details in each deployment command.

Example Use

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn improvement of an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions