Skip to content

Add a --dry-run switch or equivalent to prefect deploy #17814

@tjordahl

Description

@tjordahl

Describe the current behavior

My continuous integration/deployment fails when there is a problem in the prefect.yaml file and I would like something to be able to validate all the entries so this can be done before the changes are merged and attempted to be deployed.

The current prefect deploy --all will deploy all flows up until it encounters an error, then stop. This leaves my Depoyments in a state of half new, half old deployments.

Describe the proposed behavior

In addition to validating the YAML schema for prefect.yaml, this should catch items such as:

  • Invalid parameter values
  • Incorrect endpoint specifications (missing file/function)
  • Other validation

In short, everything but the POST /deployment operation. A --dry-run switch to prefect deploy would be ideal

Example Use

prefect deploy --all --dry-run

Additional context

Slack thread: https://prefect-community.slack.com/archives/CL09KU1K7/p1744654952403849
Relevant issue: #16996

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