Prefect v2.0.b9 Release Notes

  • ๐Ÿš€ Big things are in the works for Prefect 2! This release includes breaking changes and deprecations in preparation for Prefect 2 graduating from its beta period to General Availability.

    ๐Ÿš€ With next week's release on July 27th, Prefect 2 will become the default package installed with pip install prefect. Flows written with Prefect 1 will require modifications to run with Prefect 2. Please ensure that your package management process enables you to make the transition when the time is right for you.

    Code as workflows

    ๐Ÿš€ As Prefect 2 usage has grown, we've observed a pattern among users, especially folks that were not previously users of Prefect 1. Working with Prefect was so much like working in native Python, users were often surprised that their tasks returned futures and states, Prefect objects, rather than results, the data that their Python functions were handling. This led to unfamiliar, potentially intimidating, errors in some cases. With this release, Prefect moves one step closer to code as workflows - tasks now return the results of their functions, rather than their states, by default. This means that you can truly take most native Python scripts, add the relevant @flow and @task decorators, and start running that script as a flow, benefitting from the observability and resilience that Prefect provides.

    States and futures are still important concepts in dictating and understanding the behavior of flows. You will still be able to easily access and use them with the .submit() method. You will need to modify tasks in existing Prefect 2 flows to use this method to continue working as before.

    ๐Ÿ›  Other improvements and bug fixes

    • ๐Ÿ”Š A new Secret block can store a string that is encrypted at rest as well as obfuscated in logs and the UI
    • Date filters on the flow run page in the UI now support filtering by date and time
    • ๐Ÿ’ป Each work queue page in the UI now includes a command to start a corresponding agent
    • โšก๏ธ Tutorials have been updated for increased clarity and consistency
    • โฑ Cron schedule setting errors are now more informative
    • Prefect now still works even if the active profile is missing
    • ๐Ÿ‘ Conda requirements regex now supports underscores and dots
    • ๐Ÿš€ The previously deprecated DeploymentSpec has been removed