# announcements


07/08/2022, 4:45 PM
👋 Hey Prefectionists! We're psyched to share our biggest Prefect 2.0 prefect2 release yet -
! It's full of exciting new features and refinements to existing concepts, including: Flow Run Retries 🔄 Flow run retries have been one of our most requested features, especially given how easy it is to run a flow as a "subflow" or "child flow" with Prefect 2.0. Flow run retries are configured just as task retries are - with the
parameters. If both a task and its flow have retries configured, tasks within the flow will retry up to their specified task retry limit for each flow run. For example, if you have a flow configured with a limit of 2 retries (up to 3 total runs, including the initial attempt), and a task in the flow configured with 3 retries (up to 4 attempts per flow run, including the initial attempt). The task could run up to a total of 12 attempts, since task retry limits are reset after each flow run or flow run attempt. Notifications 📣 You can always visit the Prefect UI to get a comprehensive view of the state of all of your flows, but when something goes wrong with one of them, you need that information immediately. Notifications can alert you and your team when any flow enters any state you specify, with or without specific tags. To create a notification, go to the new Notifications page via the sidebar navigation and select “Create Notification.” Notifications are structured just as you would describe them to someone. For example, if I want to get a Slack message every time my daily-ETL flow fails, my notification will simply read:
If a run of any flow with any tag enters a failed state, send a notification to Slack
Currently, notifications can only be sent to a Slack webhook (or email addresses if you are using Prefect Cloud 2.0). Over time, notifications will support additional messaging services. Let us know which messaging services you’d like to send your notifications to! Flow packaging and deployment 📦 We've revisited our flow packaging and deployment UX, making it both more powerful and easier to use. `DeploymentSpec`s are now just `Deployment`s. Most of the fields are unchanged, but there are a few differences: • The
field has been replaced with a
field. • The
, and
parameters are now just
. You can deploy a flow directly, or you can package it with the new
module. Packaging enables you to bundle a flow with its dependencies, including Python packages. Packaging produces a Package, the artifact that contains your flow and its dependencies, as well as a Manifest, a JSON description of the package and what is inside of it. There are several ways to create a package, with more to come. For instance, you can package your flow as a Docker image containing the flow and the runtime environment necessary to run it and register it with Docker. Alternatively, you could package your flow as a reference to the import path of a package stored directly in the Prefect Orion database. Learn more in the Deployment concept documentation. You can continue to use your existing `DeploymentSpec`s, but they are deprecated and will be removed in the coming weeks. Blocks 🧱 We've been working on Blocks behind the scenes for a while. Whether you know it or not, if you've used the past few releases, you've used them. Blocks enable you to securely store configuration with the Prefect Orion server and access it from your code later with just a simple reference. Think of Blocks as secure, UI-editable, type-checked environment variables. We're starting with just a few Blocks - mostly storage, but over time we’ll expand this pattern to include every tool and service in the growing modern data stack. You'll be able to set up access to your entire stack once in just a few minutes, then manage access forever without editing your code. Breaking Changes 🚨 This release removes the deprecated
dask and
ray from the core library, breaking existing references to them. You can find them in their respective collections prefect-ray and prefect-dask. It also removes the previously deprecated restart policy for the
. Most importantly, there are new breaking changes to the Deployments interface described below. Special thanks to @Cole Murray, @Oliver Mannion, @Steve Flitcroft, and Laerte Pereira for their contributions to this release!
P 12
cloud2 9
👀 8
🙌 19
prefect2 9

Anna Geller

07/08/2022, 5:20 PM
Release notes and links to the relevant documentation pages are available in the Discourse announcement
🙏 2