Prefect 2 migration Hi all, given the recent annou...
# prefect-community
Prefect 2 migration Hi all, given the recent announcement regarding the Prefect 1 freeze I am looking for any insight on difficulties when migrating. The announcement states that most Prefect 1 flows are compatible with Prefect 2 - which types of flows/features are not? What kind of issues are common when migrating? Cheers! 🙂
Hi @Jesper Hemmingsson There are quite a few significant changes between Prefect 1 and 2 - all prefect 1 flows will require some amount of refactoring to make them valid prefect 2 flows. Some big differences that I'd highlight are: • flow definition syntax (
with Flow
) • the introduction of blocks to store configuration • integrations can now be found in collections (standalone pypi packages), as opposed to the task library within the package itself • the ability to call flows from other flows (subflows) • the ability to materialize task results directly in a flow's context • everything just looks more like normal python Do you mind sharing where you saw this? This is not accurate, although many core concepts are the same
The announcement states that most Prefect 1 flows are compatible with Prefect 2
also this may be helpful
Thank you @Nate! Regarding your question, I must have just misinterpreted the paragraph stating “_Most Prefect 1 flows can be updated to run with Prefect 2 in just a few minutes”._ Sorry about the confusion.
no problem! as far as issues I've noticed watching people migrate, I'd mention just a few (although I think it's gone fairly well thus far): • not making use of the collections (which we're trying to help with by making them more discoverable) • confusion around subflow patterns, a very helpful utility for running subflows on their own infrastructure is
• remembering to install a filesystem protocol package (like s3fs) in your agent environment so your runtime can pull your flow code 🙂
Thank you @Nate!
Hi @Jesper Hemmingsson, my name is Sahil, and I’m with our Product Advocate team. Our users have described migrating from 1 to 2 is as easy as converting the 1.0 code into more simpler python syntax by adding in our 2.0 decorators. We have found it to be a pretty light lift. I'd be happy to jump on a call to chat more, and cover in more detail. Feel free to DM me if you’d like to set up a call!