-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added snow spcs compute-pool deploy command
- Loading branch information
1 parent
b39d50b
commit f689459
Showing
13 changed files
with
555 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/snowflake/cli/_plugins/spcs/compute_pool/compute_pool_entity.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from snowflake.cli._plugins.spcs.compute_pool.compute_pool_entity_model import ( | ||
ComputePoolEntityModel, | ||
) | ||
from snowflake.cli.api.entities.common import EntityBase | ||
|
||
|
||
class ComputePoolEntity(EntityBase[ComputePoolEntityModel]): | ||
pass |
23 changes: 23 additions & 0 deletions
23
src/snowflake/cli/_plugins/spcs/compute_pool/compute_pool_entity_model.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from typing import Literal, Optional | ||
|
||
from pydantic import Field | ||
from snowflake.cli.api.project.schemas.entities.common import EntityModelBase | ||
from snowflake.cli.api.project.schemas.updatable_model import DiscriminatorField | ||
|
||
|
||
class ComputePoolEntityModel(EntityModelBase): | ||
type: Literal["compute-pool"] = DiscriminatorField() # noqa: A003 | ||
min_nodes: Optional[int] = Field(title="Minimum number of nodes", default=None) | ||
max_nodes: Optional[int] = Field(title="Maximum number of nodes", default=None) | ||
instance_family: str = Field(title="Name of the instance family", default=None) | ||
auto_resume: Optional[bool] = Field( | ||
title="The compute pool will automatically resume when a service or job is submitted to it", | ||
default=True, | ||
) | ||
initially_suspended: Optional[bool] = Field( | ||
title="Starts the compute pool in a suspended state", default=False | ||
) | ||
auto_suspend_seconds: Optional[int] = Field( | ||
title="Number of seconds of inactivity after which you want Snowflake to automatically suspend the compute pool", | ||
default=3600, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.