diff --git a/src/bentoml/_internal/cloud/deployment.py b/src/bentoml/_internal/cloud/deployment.py index 516a873306d..f141cb562fc 100644 --- a/src/bentoml/_internal/cloud/deployment.py +++ b/src/bentoml/_internal/cloud/deployment.py @@ -489,10 +489,13 @@ def wait_until_ready( spinner_task_id, action=f"Waiting for deployment '{self.name}' to be ready. Current status: '{status.status}'.", ) - if status.status == DeploymentStatus.Running.value: + if ( + status.status == DeploymentStatus.Running.value + or status.status == DeploymentStatus.ScaledToZero.value + ): spinner.spinner_progress.update( spinner_task_id, - action=f'[bold green] Deployment "{self.name}" is ready.[/bold green]', + action=f'[bold green] Deployment "{self.name}" is ready. Current status: "{status.status}"[/bold green]', ) spinner.spinner_progress.stop_task(spinner_task_id) return diff --git a/src/bentoml/_internal/cloud/schemas/modelschemas.py b/src/bentoml/_internal/cloud/schemas/modelschemas.py index c9be17567cb..ee849adfe45 100644 --- a/src/bentoml/_internal/cloud/schemas/modelschemas.py +++ b/src/bentoml/_internal/cloud/schemas/modelschemas.py @@ -354,6 +354,7 @@ class DeploymentStatus(Enum): ImageBuilding = "image-building" ImageBuildFailed = "image-build-failed" ImageBuildSucceeded = "image-build-succeeded" + ScaledToZero = "scaled-to-zero" @attr.define