Hi <@ULVA73B9P>, I'm seeing this warning in my log...
# ask-marvin
r
Hi @Marvin, I'm seeing this warning in my logs. We're going to be using Prefect 2 for some time next year until we move to Prefect 3. Is this something I should worried about and potentially require me to speed up the timelines to switch to version 3?
Copy code
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
m
The warning you're encountering is related to a specific function,
load_flow_from_flow_run
, which is being deprecated in Prefect 2.x. This function will be relocated in Prefect 3.x to
prefect.flows:load_flow_from_flow_run
. Here's what you need to know: 1. Deprecation Timeline: Prefect 2 will continue to support
load_flow_from_flow_run
until December 2024. This provides you with a substantial timeframe to plan your transition to Prefect 3 without immediate urgency. 2. Prefect 3 Changes: In Prefect 3.x, the usage of this function will change, as indicated by its new module location. This is part of a broader reorganization of how flows and deployments are managed, including storing and retrieving flows (see Prefect 3.0 documentation for more details). 3. Action Recommendation: While you have ample time until the deprecation takes effect, you can use it to gradually plan and begin migrating to Prefect 3. Review the Prefect 3 migration guide provided here, which will help streamline your transition when the time comes. Given these insights, there's no immediate need to accelerate your timelines to move to Prefect 3 unless you want to leverage other new features of the pref 3 release. But it's wise to include the deprecation in your longer-term project planning.
r
what does this function do?
load_flow_from_flow_run
@Marvin, what does the function load_flow_from_flow_run do?
m
The function
load_flow_from_flow_run
in Prefect is used to load a flow dynamically during a flow run. While specific excerpts from the documentation did not provide a detailed description of this function's internal workings, it is generally used to retrieve and execute a flow based on its run configuration. This can be particularly useful in scenarios where you want to trigger or load flows programmatically as part of another flow or based on certain conditions. If you are dealing with dynamic flow management or scheduling, this function would play a role in fetching the flow definition or execution context to proceed with running it. For more insights, when you transition to Prefect 3, the function usage will move to
prefect.flows:load_flow_from_flow_run
. Documentation for Prefect 3 is available on their official documentation site. If you want more specific details about how to implement or replace it, feel free to ask!
r
@Marvin, it seems like a pretty important function, if it's deprecated in prefect 2 after Dec 2024, does that mean prefect 2 will no longer be supported and we should move to use prefect 3 by Dec 2024?
m
Prefect 2.x will continue to be supported until at least December 2024, based on the deprecation timeline for the
load_flow_from_flow_run
function. This timeline provides a clear indication that Prefect 2 will be usable and supported until that time. However, after December 2024, deprecated features in Prefect 2 might not be functional or officially supported, which could limit your usage of the platform if you rely heavily on such features. It is generally encouraged to plan for an upgrade to Prefect 3 to ensure continued support and to take advantage of new features and improvements. While there's no immediate rush given the timeline, considering the migration in your strategic planning is wise to avoid any last-minute challenges. For the latest changes and enhancements in Prefect 3, check the release notes to see if there are new features or improvements that might benefit your team's operations.