Skip to content

Commit ffe05fc

Browse files
docs(api): update min_size parameter docs in prebuilds warm pool methods
1 parent b390afb commit ffe05fc

6 files changed

Lines changed: 20 additions & 13 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 193
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-46b2bdeb8322ab3291dc87f9ac5d2e899a8ea34f79b2c2b1beadc551a1700fcf.yml
3-
openapi_spec_hash: 1a1032b0d0f6ce441d13430b58abb3a0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-dc7143aaf5c9250839a926b35309a54fab505e05d50ea7bc06adf2bcbcdbc889.yml
3+
openapi_spec_hash: b1b47e82090bf165700db79dd40533fe
44
config_hash: de54bcc58fea1260a6792f8fd013439b

src/gitpod/resources/prebuilds.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,8 @@ def create_warm_pool(
466466
never scale above this value. Must be >= min_size and <= 20.
467467
468468
min_size: min_size is the minimum number of warm instances to maintain. The pool will
469-
never scale below this value. Must be >= 1 and <= max_size.
469+
never scale below this value. Must be >= 0 and <= max_size. Set to 0 to allow
470+
full scale-down.
470471
471472
extra_headers: Send extra headers
472473
@@ -704,7 +705,8 @@ def update_warm_pool(
704705
never scale above this value. Must be >= min_size and <= 20.
705706
706707
min_size: min_size updates the minimum number of warm instances to maintain. The pool will
707-
never scale below this value. Must be >= 1 and <= max_size.
708+
never scale below this value. Must be >= 0 and <= max_size. Set to 0 to allow
709+
full scale-down.
708710
709711
extra_headers: Send extra headers
710712
@@ -1155,7 +1157,8 @@ async def create_warm_pool(
11551157
never scale above this value. Must be >= min_size and <= 20.
11561158
11571159
min_size: min_size is the minimum number of warm instances to maintain. The pool will
1158-
never scale below this value. Must be >= 1 and <= max_size.
1160+
never scale below this value. Must be >= 0 and <= max_size. Set to 0 to allow
1161+
full scale-down.
11591162
11601163
extra_headers: Send extra headers
11611164
@@ -1393,7 +1396,8 @@ async def update_warm_pool(
13931396
never scale above this value. Must be >= min_size and <= 20.
13941397
13951398
min_size: min_size updates the minimum number of warm instances to maintain. The pool will
1396-
never scale below this value. Must be >= 1 and <= max_size.
1399+
never scale below this value. Must be >= 0 and <= max_size. Set to 0 to allow
1400+
full scale-down.
13971401
13981402
extra_headers: Send extra headers
13991403

src/gitpod/types/prebuild_create_warm_pool_params.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ class PrebuildCreateWarmPoolParams(TypedDict, total=False):
3838
min_size: Annotated[Optional[int], PropertyInfo(alias="minSize")]
3939
"""
4040
min_size is the minimum number of warm instances to maintain. The pool will
41-
never scale below this value. Must be >= 1 and <= max_size.
41+
never scale below this value. Must be >= 0 and <= max_size. Set to 0 to allow
42+
full scale-down.
4243
"""

src/gitpod/types/prebuild_update_warm_pool_params.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ class PrebuildUpdateWarmPoolParams(TypedDict, total=False):
2929
min_size: Annotated[Optional[int], PropertyInfo(alias="minSize")]
3030
"""
3131
min_size updates the minimum number of warm instances to maintain. The pool will
32-
never scale below this value. Must be >= 1 and <= max_size.
32+
never scale below this value. Must be >= 0 and <= max_size. Set to 0 to allow
33+
full scale-down.
3334
"""

src/gitpod/types/warm_pool_spec.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class WarmPoolSpec(BaseModel):
3535
min_size: Optional[int] = FieldInfo(alias="minSize", default=None)
3636
"""
3737
min_size is the minimum number of warm instances to maintain. The pool will
38-
never scale below this value. Must be >= 1 and <= max_size.
38+
never scale below this value. Must be >= 0 and <= max_size. Set to 0 to allow
39+
full scale-down.
3940
"""
4041

4142
snapshot_id: Optional[str] = FieldInfo(alias="snapshotId", default=None)

tests/api_resources/test_prebuilds.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def test_method_create_warm_pool_with_all_params(self, client: Gitpod) -> None:
280280
project_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047",
281281
desired_size=2,
282282
max_size=1,
283-
min_size=1,
283+
min_size=20,
284284
)
285285
assert_matches_type(PrebuildCreateWarmPoolResponse, prebuild, path=["response"])
286286

@@ -440,7 +440,7 @@ def test_method_update_warm_pool_with_all_params(self, client: Gitpod) -> None:
440440
warm_pool_id="a1b2c3d4-5678-9abc-def0-1234567890ab",
441441
desired_size=5,
442442
max_size=1,
443-
min_size=1,
443+
min_size=20,
444444
)
445445
assert_matches_type(PrebuildUpdateWarmPoolResponse, prebuild, path=["response"])
446446

@@ -728,7 +728,7 @@ async def test_method_create_warm_pool_with_all_params(self, async_client: Async
728728
project_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047",
729729
desired_size=2,
730730
max_size=1,
731-
min_size=1,
731+
min_size=20,
732732
)
733733
assert_matches_type(PrebuildCreateWarmPoolResponse, prebuild, path=["response"])
734734

@@ -888,7 +888,7 @@ async def test_method_update_warm_pool_with_all_params(self, async_client: Async
888888
warm_pool_id="a1b2c3d4-5678-9abc-def0-1234567890ab",
889889
desired_size=5,
890890
max_size=1,
891-
min_size=1,
891+
min_size=20,
892892
)
893893
assert_matches_type(PrebuildUpdateWarmPoolResponse, prebuild, path=["response"])
894894

0 commit comments

Comments
 (0)