🎉 Support for access block fields in prefect.yaml
templating
You can now access fields on blocks used in your prefect.yaml
files. This enables you to use values stored in blocks to provide dynamic configuration for attributes like your work_pool_name
and job_variables
.
Here's what it looks like in action:
deployments:
- name: test
version: 0.1
tags: []
description: "Example flow"
schedule: {}
entrypoint: "flow.py:example_flow"
parameters: {}
work_pool:
name: "{{ prefect.blocks.json.default-config.value.work_pool }}"
work_queue: "{{ prefect.blocks.json.default-config.value.work_queue }}"
In the above example, we use fields from a JSON
block to configure which work pool and queue we deploy our flow to. We can update where our flow is deployed to by updating the referenced block without needing to change our prefect.yaml
at all!
Many thanks to @bjarneschroeder for contributing this functionality! Check out this PR for implementation details: #10938
👍🏼 Enhancements
- Add the
wait_for_flow_run
method toPrefectClient
to allow waiting for a flow run to complete — #11305 - Add a provisioner for
Modal
push work pools — #11665 - Expose the
limit
kwarg inserve
to increase its visibility — #11645 - Add methods supporting modification and suppression of flow run notification policies — #11163
- Enhancements to sending and receiving flow run inputs by automatically converting types to
RunInput
subclasses — #11636
⛑️ Fixes
- Fix block reference resolution in
prefect.yaml
and support accessing block fields using keypaths — #10938 - Avoid rerunning task runs forced to
COMPLETED
state — #11385 - Add a new UI setting to customize the served static directory — #11648
✏️ Documentation
- Fix retry handler example code in task concept docs — #11633
- Fix docstring example in
from_source
— #11634 - Add an active incident screenshot to the documentation — #11647
- Add clarification on work queues being a feature of hybrid work pools only — #11651
- Update interactive workflow guide description and heading — #11663
- Add API reference documentation for
wait_for_flow_run
— #11668 - Remove duplicate line in
prefect deploy
docs — #11644 - Update README to clearly mention running the Python file before starting server — #11643
- Fix typo in
Modal
infrastructure documentation — #11676
🥇 New Contributors
- @N-Demir made their first contribution in #11633
- @sgbaird made their first contribution in #11644
- @bjarneschroeder made their first contribution in #10938
- @Fizzizist made their first contribution in #11305
- @NeodarZ made their first contribution in #11163