PrefectHQ
prefect
BlogDocsChangelog

feat: add update methods for artifacts to support mid-flow updates

#19994
Comparing
majiayu000:feat/update-artifacts-mid-flow-10955
(
0dbef57
) with
main
(
8f441a4
)
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
-1%
600.3 µs604.7 µs

Ignored

bench_flow_decorator
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
-1%
5.4 ms5.5 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
+4%
171.8 ms165.9 ms
bench_flow_call[options1]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
-1%
106.5 ms107.8 ms
bench_task_call
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
+2%
32.1 ms31.7 ms
bench_task_submit
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
+56%
14.4 ms9.2 ms

Commits

Click on a commit to change the comparison range
Base
main
8f441a4
-0.38%
feat: add update methods for artifacts to support mid-flow updates This adds the ability to update existing artifacts during a flow run, addressing the use case where users have long-running flows and want to update artifact data progressively rather than creating new versions. Changes: - Add `update()` and `aupdate()` methods to the `Artifact` base class - Add convenience functions for updating specific artifact types: - `update_markdown_artifact` / `aupdate_markdown_artifact` - `update_table_artifact` / `aupdate_table_artifact` - `update_link_artifact` / `aupdate_link_artifact` - `update_image_artifact` / `aupdate_image_artifact` These complement the existing `update_progress_artifact` function. Closes #10955 Signed-off-by: majiayu000 <1835304752@qq.com>
0dbef57
4 hours ago
by majiayu000
© 2025 CodSpeed Technology
Home Terms Privacy Docs