02/10/2023, 5:02 PM
questions about migrating from v1 to v2 on a sizable project: 1. is it easier to open a branch for the migration, or to open a new repo completely? 2. how much of a 1:1 is the infrastructure? i see that agents behave differently, and that we can set up infra via the UI. should we expect a total overhaul of what we have today? (we are using ECS)

Henning Holgersen

02/10/2023, 8:10 PM
I bet you could find 10 people with 11 opinions about this, so here is one of mine: 1. For simple flows that are mostly straight python code, there isn’t much code change in the flow. Absolutely within what is reasonable for a branch. 2. For flows that use libraries like shell-tasks, dbt etc, there will be some minor changes. but still nothing big. 3. Some more complex flows with a lot of prefect1-specific code might need more refactoring. I had to rewrite a little because I used to run tasks inside of tasks. But still not unreasonable to keep in a separate branch. 4. The big change might be in deployments/registering flows. This is where you see the big code change, and possibly structural changes to your repo. We started a separate repo for our prefect2 flows, partially because we changed the structure and how we registered the flows, and partially because we wanted to run in parallel for a while. We did not change the infrastructure at all (Azure AKS), we just spun up another agent. One thing I would have done differently today, is to (as far as possible) define all blocks as code so that we could have git-ops’ed those as well.


02/10/2023, 8:33 PM
@Henning Holgersen this is extra helpful, thank you so much
cc @Javier Ochoa