PrefectHQ
prefect
BlogDocsChangelog

feat: add `prefect deployment export` CLI command

#19745
Comparing
devin/1765498151-deployment-export
(
a60c917
) with
main
(
cb1adb7
)
CodSpeed Performance Gauge
0%
Untouched
2
Ignored
6

Benchmarks

Passed

bench_task_decorator
benches/bench_tasks.py
CodSpeed Performance Gauge
0%
463.9 µs463.9 µs
bench_import_prefect_flow
benches/bench_import.py
CodSpeed Performance Gauge
0%
1.4 s1.4 s

Ignored

bench_task_call
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
0%
32.2 ms32.3 ms
bench_task_submit
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
-19%
12 ms14.8 ms
bench_import_prefect
benches/bench_import.py
Ignored
CodSpeed Performance Gauge
0%
1.1 s1.1 s
bench_flow_call[options0]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
0%
163.9 ms163.3 ms
bench_flow_decorator
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+13%
5.7 ms5 ms
bench_flow_call[options1]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
0%
107.7 ms107.4 ms

Commits

Click on a commit to change the comparison range
Base
main
cb1adb7
-0.05%
feat: add prefect deployment export CLI command Implements a new CLI command to export deployment configurations from the Prefect server to a YAML file. This is the inverse of 'prefect deploy' - instead of turning a YAML file into deployments, it connects to Prefect and outputs deployment configs as YAML. Features: - Export a single deployment with --name <flow>/<deployment> - Export all deployments with --all - Customize output path with --output (must be .yaml or .yml) - Interactive mode: prompts for output path, defaults to prefect.yaml - Non-interactive mode: requires --output flag - Prompts for confirmation before overwriting existing files The exported YAML includes: - name, version, description, entrypoint - tags, parameters, enforce_parameter_schema - work_pool configuration (name, work_queue_name, job_variables) - schedules (with active status and max_scheduled_runs) - concurrency_limit settings - pull steps Closes #19742 Co-Authored-By: Nate Nowack <nate@prefect.io>
4cec5df
13 hours ago
by devin-ai-integration[bot]
+0.03%
refactor: use existing DeploymentConfig/PrefectYamlModel schemas for export Address PR feedback: - Changed output parameter from Optional[str] to Optional[Path] for stronger typing - Refactored _deployment_response_to_yaml_dict to _deployment_response_to_config which returns a DeploymentConfig instead of a dict - Use PrefectYamlModel to wrap deployment configs and model_dump for serialization - This reuses the same schema that prefect deploy uses, keeping YAML shape centralized Co-Authored-By: Nate Nowack <nate@prefect.io>
a60c917
13 hours ago
by devin-ai-integration[bot]
© 2025 CodSpeed Technology
Home Terms Privacy Docs