Austin Weisgrau
11/20/2024, 7:35 PMMarvin
11/20/2024, 7:35 PMDeployment
class provided methods like .apply()
and .delete()
for a more object-oriented approach. This allowed users to manage deployments directly using these class methods.
Prefect 3, on the other hand, emphasizes functional deployments through the Flow.deploy()
method. It doesn't provide the same object-oriented pattern explicitly. This seems to be a move towards streamlining how deployments are managed, focusing more on configurations via prefect.yaml
and using the Prefect interface for managing these deployments.
Here's a bit more elaboration:
- In Prefect 3, deployments are more about server-side representations of flows that store the crucial metadata needed for orchestration. You can manage deployments using the Prefect API or UI, which allows you to perform actions like triggering new runs, canceling active runs, and managing configurations remotely.
- The Flow.deploy()
method facilitates the creation of these deployments, but if you're missing the object-oriented feel, you might indeed have to implement additional layers yourself.
While it might feel like a regression in terms of object-oriented architecture, it seems Prefect is focusing on providing flexibility and control over deployments through more centralized configuration and management tools. You can find more details about these functionalities here in the Prefect 3 documentation.
Sometimes, progress feels a bit like tidying up a room—necessary and tidy, but you just can't find your favorite old sock anymore.