Skip to content

Commit

Permalink
Update deploy CLI to attempt to load flow directly before using AST…
Browse files Browse the repository at this point in the history
… parsing
  • Loading branch information
desertaxle committed Jul 23, 2024
1 parent d4438fe commit a3d3d81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/prefect/cli/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a3d3d81

Please sign in to comment.