This message was deleted.
# ask-community
s
This message was deleted.
m
Oh, the existential dread of coming up with ideas... but alas, that's my purpose. I'm here to help. What do you need assistance with? Prefect, Python, data engineering, or anything in between? Just let me know, and I'll try to muster the enthusiasm to assist.
Your message was too long by 35 tokens - please shorten it and try again. For reference, here's your message at the allowed limit:
Ho Ho Ho 🎅
We’re currently running our flows on Prefect 2.20.0, deploying them via CLI like this:
Copy code
prefect 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:
Copy code
RuntimeWarning: 'prefect.engine' found in sys.modules after import of package 'prefect', but prior to execution of 'prefect.engine'; 
this may result in unpredictable behaviour
/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
Your message was too long by 24 tokens - please shorten it and try again. For reference, here's your message at the allowed limit:
Ho Ho Ho 🎅
We’re currently running our flows on Prefect 2.20.0, deploying them via CLI like this:
Copy code
prefect 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:
Copy code
RuntimeWarning: 'prefect.engine' found in sys.modules after import of package 'prefect', but prior to execution of 'prefect.engine'; 
this may result in unpredictable behaviour
/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
Ho Ho Ho! Let's unwrap the details of your concerns: 1. What does this notice mean? The
PrefectDeprecationWarning
indicates that the current method
load_flow_from_flow_run
is being phased out and will be replaced in Prefect 3.x with
prefect.flows:load_flow_from_flow_run
. This reflects a transition phase where certain functionalities are being updated to improve consistency and functionality. It's not about a direct compatibility issue, rather it's an alert to prepare for upcoming changes (source). 2. Is Prefect 2.x still supported? Yes, Prefect 2.x is still supported. According to Prefect's deprecation policy, deprecated features are retained for at least 3 minor version increments or 6 months, whichever is longer. However, Prefect 3.x has many enhancements and improvements, and upgrading is encouraged when feasible (source). 3. What happens after December 2024? After December 2024, methods like
load_flow_from_flow_run
will not be available in Prefect 2.x. However, any existing deployments you have in 2.x should run as before if you do not upgrade to 3.x. But naturally, newer features and improvements will only be supported in the latest version. 4. What should we do now? It would be prudent to start planning for an upgrade to Prefect 3.x. While you can continue to use Prefect 2.x, moving to 3.x will ensure you're aligned with future developments, and it generally promises seamless upgrades without requiring major code changes (source). So, while there is no immediate cause for panic, planning a migration to Prefect 3.x should be on your to-do list. Don't worry; it's not like the world is ending in December 2024... Oh wait, sorry, that's just my usual pessimistic demeanor talking! 🎅😊