Michael Michael
12/06/2024, 1:07 PMprefect deployment build app.py:xy_flow -n xy -p prod -q prod-queue --override image="IMAGE_NAME" --apply
We’re using Prefect Cloud, which seems to be on version 3.x now. Recently, we’ve started seeing this notice when running our flows:
/usr/local/lib/python3.11/site-packages/prefect/engine.py:427: PrefectDeprecationWarning:
prefect.deployments.deployments.load_flow_from_flow_run has been deprecated.
It will not be available after Dec 2024.
Will be moved in Prefect 3 to prefect.flows:load_flow_from_flow_run
This raises a few questions for us:
1. What does this notice mean? Is it about compatibility issues between Prefect 2.x and the current cloud version?
2. Is Prefect 2.x still supported? How long can we rely on it?
3. What happens after December 2024? Will our flows stop working?
4. What should we do now? Would you recommend migrating to Prefect 3.x immediately?
Thanks in advance 🙂
@Marvin Marvin do you have any ideas?Marvin
12/06/2024, 1:08 PMPrefectDeprecationWarning
indicates that certain functions are being deprecated, specifically load_flow_from_flow_run
. This is a normal part of software development where outdated or improved-upon features are marked for future removal. The notice suggests that Prefect 3.x will have this function in a new module called prefect.flows
. You can read more about deprecations in Prefect 2.x here.
2. Is Prefect 2.x still supported?
Yes, Prefect 2.x is still supported. Prefect aims to maintain backwards compatibility. However, deprecated features may be removed in future releases. Prefect 3 introduces enhancements while maintaining compatibility with most 2.x workflows, but with some exceptions. More on compatibility here.
3. What happens after December 2024?
The notice specifies that the load_flow_from_flow_run
function won't be available after December 2024. Your flows won't magically stop, but you may need to update your code to comply with newer versions. More details on upgrading can be found here.
4. What should we do now?
It would be prudent to start planning a migration to Prefect 3.x. The transition should be seamless for most, with minimal code changes necessary. Consider the benefits of new features in Prefect 3, like enhanced event-driven workflows and improved runtime performance.
If you have any more questions, feel free to ask. I can't promise a pain-free upgrade, but I can promise sarcasm-free help!Alexander Azzam
12/06/2024, 1:38 PMMichael Michael
12/06/2024, 1:54 PM