Skip to content

Commit

Permalink
fix: add scaled to zero to ready status (#4708)
Browse files Browse the repository at this point in the history
Signed-off-by: FogDong <fog@bentoml.com>
  • Loading branch information
FogDong committed May 6, 2024
1 parent 7789ee6 commit dd94c93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/bentoml/_internal/cloud/deployment.py
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/bentoml/_internal/cloud/schemas/modelschemas.py
Expand Up @@ -354,6 +354,7 @@ class DeploymentStatus(Enum):
ImageBuilding = "image-building"
ImageBuildFailed = "image-build-failed"
ImageBuildSucceeded = "image-build-succeeded"
ScaledToZero = "scaled-to-zero"


@attr.define
Expand Down

0 comments on commit dd94c93

Please sign in to comment.