Ryan Peden

02/09/2023, 10:06 PM
Prefect 2.8.0 has been released! 🎆 :cloud2: 😛refect2: 😛refect-duck: Prioritize flow runs with work pools With this release, flow runs can now be prioritized among work queues via work pools! Work pools allow you to organize and prioritize work by grouping related work queues together. Within work pools, you can assign a priority to each queue, and flow runs scheduled on higher priority work queues will be run before flow runs scheduled on lower priority work queues. This allows agents to prioritize work that is more important or time-sensitive even if there is a large backlog of flow runs on other work queues in a given work pool. All existing work queues will be assigned to a default work pool named
. Creating a new work pool can be done via the Work Pools page in the UI or via the CLI. To create a new work pool named “my-pool” via the CLI:
prefect work-pool create "my-pool"
Each work pool starts out with a default queue. New queues can be added to a work pool via the UI or the CLI. To create a new work queue in a work pool via the CLI:
prefect work-queue create "high-priority" --pool "my-pool"
Deployments can now be assigned to a work queue in a specific work pool. Use the
flag to specify the work pool and the
flag to specify the work queue when building a deployment.
prefect deployment build \ 
--pool my-pool \
--queue high-priority \
--name high-priority \
Once a deployment has been created and is scheduling flow runs on a work queue, you can start an agent to pick up those flow runs by starting an agent with the
prefect agent start --pool my-pool
Starting an agent with the
command allows the agent to pick up flow runs for the entire pool even as new queues are added to the pool. If you want to start an agent that only picks up flow runs for a specific queue, you can use the
prefect agent start --pool my-pool --queue high-priority
A few other important parts of this release: • The ability to create a flow run from the UI with parameters from a previous run — #8405 • A generic
block — #8401 • Override customizations functionality for CLI deployments v— #8349 • It's now possible to reset concurrency limits in CLI to purge existing runs from taking concurrency slots — #8408 To learn more about work pools, and everything else we've added or updated, check out the docs or see the relevant pull requests in the release notes.
:party-parrot: 2
🙌 13
:marvin: 10
:oh-yeah: 7
🎉 8
🔥 6
:blob-attention-gif: 3