From a3d3d81b9f402e7773a3141fd6aab534b9b54b67 Mon Sep 17 00:00:00 2001 From: Alex Streed Date: Tue, 23 Jul 2024 09:11:14 -0500 Subject: [PATCH] Update `deploy` CLI to attempt to load flow directly before using AST parsing --- src/prefect/cli/deploy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/prefect/cli/deploy.py b/src/prefect/cli/deploy.py index d9f3625abae8..f7ee2311bc76 100644 --- a/src/prefect/cli/deploy.py +++ b/src/prefect/cli/deploy.py @@ -57,7 +57,7 @@ from prefect.deployments.steps.core import run_steps from prefect.events import DeploymentTriggerTypes, TriggerTypes from prefect.exceptions import ObjectNotFound, PrefectHTTPStatusError -from prefect.flows import safe_load_flow_from_entrypoint +from prefect.flows import load_flow_from_entrypoint from prefect.settings import ( PREFECT_DEFAULT_WORK_POOL_NAME, PREFECT_UI_URL, @@ -471,7 +471,7 @@ async def _run_single_deploy( ) deploy_config["entrypoint"] = await prompt_entrypoint(app.console) - flow = safe_load_flow_from_entrypoint(deploy_config["entrypoint"]) + flow = load_flow_from_entrypoint(deploy_config["entrypoint"]) assert flow is not None, "Flow could not be loaded from entrypoint." deploy_config["flow_name"] = flow.name