From 0d30fdadf9a3077f73582f5cf6ab765b64734a21 Mon Sep 17 00:00:00 2001 From: Eric Gustin <34000337+EricGustin@users.noreply.github.com> Date: Tue, 4 Nov 2025 17:44:16 -0800 Subject: [PATCH] Better explain why `arcade deploy` may have failed (#677) Another small one. When you `arcade deploy`, you need to 1. Run the command from the root of your project, and 2. Specify the relative path to your entrypoint file if it is not located at the root of your repository or if it is named something other than `server.py`. --- libs/arcade-cli/arcade_cli/deploy.py | 15 ++++++++++++--- pyproject.toml | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/libs/arcade-cli/arcade_cli/deploy.py b/libs/arcade-cli/arcade_cli/deploy.py index a95c259c..842dee35 100644 --- a/libs/arcade-cli/arcade_cli/deploy.py +++ b/libs/arcade-cli/arcade_cli/deploy.py @@ -290,7 +290,7 @@ def server_already_exists(engine_url: str, api_key: str, server_name: str) -> bo response.raise_for_status() - return response.json().get("managed") + return cast(bool, response.json().get("managed")) def update_deployment( @@ -723,7 +723,7 @@ def deploy_server_logic( user_email = config.user.email if config.user else "User" console.print(f"✓ {user_email} is logged in", style="green") - # Step 2: Validate pyproject.toml exists in current directory + # Step 2: Validate necessary files exist in the correct location console.print("\nValidating pyproject.toml exists in current directory...", style="dim") current_dir = Path.cwd() pyproject_path = current_dir / "pyproject.toml" @@ -731,9 +731,18 @@ def deploy_server_logic( if not pyproject_path.exists(): raise FileNotFoundError( f"pyproject.toml not found at {pyproject_path}\n" - "Please run this command from the root of your MCP server package." + "Please run this command from the root of your MCP server package (the same directory that contains pyproject.toml)." ) console.print(f"✓ pyproject.toml found at {pyproject_path}", style="green") + console.print("\nValidating entrypoint file exists at the specified location...", style="dim") + entrypoint_path = current_dir / entrypoint + if not entrypoint_path.exists(): + raise FileNotFoundError( + f"Entrypoint file not found at {entrypoint_path}\n" + "Please specify the correct entrypoint file using the --entrypoint/-e flag.\n" + "For example: arcade deploy -e src/my_server/server.py" + ) + console.print(f"✓ Entrypoint file found at {entrypoint_path}", style="green") # Step 3: Load .env file from current directory if it exists console.print("\nLoading .env file from current directory if it exists...", style="dim") diff --git a/pyproject.toml b/pyproject.toml index 36f04fa4..68b6c6df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "arcade-mcp" -version = "1.5.1" +version = "1.5.2" description = "Arcade.dev - Tool Calling platform for Agents" readme = "README.md" license = {file = "LICENSE"}