From 2402f25cc02e8a959a08f73e319c1d2ce76ba4bb Mon Sep 17 00:00:00 2001 From: Jonathan Ehwald Date: Fri, 5 Sep 2025 18:49:32 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20support=20for=20granular=20fa?= =?UTF-8?q?ilure=20statuses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fastapi_cloud_cli/commands/deploy.py | 6 ++++++ tests/test_deploy_utils.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/fastapi_cloud_cli/commands/deploy.py b/src/fastapi_cloud_cli/commands/deploy.py index 123a4d2..8002013 100644 --- a/src/fastapi_cloud_cli/commands/deploy.py +++ b/src/fastapi_cloud_cli/commands/deploy.py @@ -108,8 +108,11 @@ class DeploymentStatus(str, Enum): ready_for_build = "ready_for_build" building = "building" extracting = "extracting" + extracting_failed = "extracting_failed" building_image = "building_image" + building_image_failed = "building_image_failed" deploying = "deploying" + deploying_failed = "deploying_failed" success = "success" failed = "failed" @@ -120,8 +123,11 @@ def to_human_readable(cls, status: "DeploymentStatus") -> str: cls.ready_for_build: "Ready for build", cls.building: "Building", cls.extracting: "Extracting", + cls.extracting_failed: "Extracting failed", cls.building_image: "Building image", + cls.building_image_failed: "Build failed", cls.deploying: "Deploying", + cls.deploying_failed: "Deploying failed", cls.success: "Success", cls.failed: "Failed", }[status] diff --git a/tests/test_deploy_utils.py b/tests/test_deploy_utils.py index 32739fc..47284f5 100644 --- a/tests/test_deploy_utils.py +++ b/tests/test_deploy_utils.py @@ -51,8 +51,11 @@ def test_includes_paths(path: Path) -> None: (DeploymentStatus.ready_for_build, "Ready for build"), (DeploymentStatus.building, "Building"), (DeploymentStatus.extracting, "Extracting"), + (DeploymentStatus.extracting_failed, "Extracting failed"), (DeploymentStatus.building_image, "Building image"), + (DeploymentStatus.building_image_failed, "Build failed"), (DeploymentStatus.deploying, "Deploying"), + (DeploymentStatus.deploying_failed, "Deploying failed"), (DeploymentStatus.success, "Success"), (DeploymentStatus.failed, "Failed"), ],