PrefectHQ
prefect
BlogDocsChangelog

Add `prefect automation update` CLI command

#20118Merged
Comparing
devin/1767723132-automation-update-cli
(
43a58fa
) with
main
(
b440c70
)
CodSpeed Performance Gauge
0%
Untouched
2
Ignored
6

Benchmarks

Passed

bench_import_prefect_flow
benches/bench_import.py
CodSpeed Performance Gauge
0%
1.4 s1.4 s
bench_task_decorator
benches/bench_tasks.py
CodSpeed Performance Gauge
0%
601.3 µs602.6 µs

Ignored

bench_task_submit
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
-51%
6.6 ms13.5 ms
bench_flow_call[options0]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+47%
163.7 ms111.1 ms
bench_flow_call[options1]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+1%
107.7 ms106.4 ms
bench_import_prefect
benches/bench_import.py
Ignored
CodSpeed Performance Gauge
0%
1.1 s1.1 s
bench_task_call
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
+9%
35 ms32.1 ms
bench_flow_decorator
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
-10%
5 ms5.6 ms

Commits

Click on a commit to change the comparison range
Base
main
b440c70
+0.12%
Add 'prefect automation update' CLI command Adds a new CLI command to update existing automations from a YAML/JSON file or JSON string, addressing issue #20116. The command follows the same patterns as the existing 'create' command: - --id flag to specify the automation to update (required) - --from-file/-f to provide automation data from a YAML or JSON file - --from-json/-j to provide automation data as a JSON string Includes comprehensive test coverage for: - Updating from YAML file - Updating from JSON file - Updating from JSON string - Error handling for not found, invalid ID, invalid file extension, file not found, invalid JSON, missing input, both inputs provided, and validation errors Co-Authored-By: Nate Nowack <nate@prefect.io>
392e4f2
2 days ago
by devin-ai-integration[bot]
-0.15%
Remove @requires_automations decorator and consolidate tests - Remove the @requires_automations decorator from the update command (appears to be dead code from when automations were experimental) - Consolidate 11 tests down to 4 using pytest.mark.parametrize - Tests now cover: file updates (YAML/JSON), JSON string updates, not found errors, and input validation errors Co-Authored-By: Nate Nowack <nate@prefect.io>
8c67faf
2 days ago
by devin-ai-integration[bot]
+0.15%
Address PR review feedback - Change from_file parameter type from str to Path (typer handles conversion) - Update error message to 'Automation config failed validation' for clarity - Remove unnecessary Path() conversion since from_file is now typed as Path Co-Authored-By: Nate Nowack <nate@prefect.io>
c4eb665
2 days ago
by devin-ai-integration[bot]
-0.22%
Rewrite tests to use real API instead of mocking - Use prefect_client fixture to create real automations in test DB - Use run_sync_in_worker_thread for invoke_and_assert in async tests - Handle 404 error gracefully when automation not found - Add proper imports for AutomationCore and run_sync_in_worker_thread Co-Authored-By: Nate Nowack <nate@prefect.io>
43a58fa
2 days ago
by devin-ai-integration[bot]
© 2026 CodSpeed Technology
Home Terms Privacy Docs