Skip to content

Commit 8f45663

Browse files
feat(devbox): add SCHEDULED status to the data model (#9654)
1 parent 8ca990e commit 8f45663

5 files changed

Lines changed: 61 additions & 18 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: 120
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-1fc91661b27bb65f33c23969c150c99919820c6750b0f40dfad0d22e8827a82c.yml
3-
openapi_spec_hash: 2659e11dc1a69ec327f5e7bb0c0c6fe2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-22ab4a80734e5e3792b7287a1281280d52eff936be4d805011521a1b64e1998d.yml
3+
openapi_spec_hash: d109d3b797016fe7657935d55549cc31
44
config_hash: ed1fdd7c9f0a25647e16b602bad4ff2e

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,15 @@ def list(
532532
limit: int | Omit = omit,
533533
starting_after: str | Omit = omit,
534534
status: Literal[
535-
"provisioning", "initializing", "running", "suspending", "suspended", "resuming", "failure", "shutdown"
535+
"scheduled",
536+
"provisioning",
537+
"initializing",
538+
"running",
539+
"suspending",
540+
"suspended",
541+
"resuming",
542+
"failure",
543+
"shutdown",
536544
]
537545
| Omit = omit,
538546
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -2195,7 +2203,15 @@ def list(
21952203
limit: int | Omit = omit,
21962204
starting_after: str | Omit = omit,
21972205
status: Literal[
2198-
"provisioning", "initializing", "running", "suspending", "suspended", "resuming", "failure", "shutdown"
2206+
"scheduled",
2207+
"provisioning",
2208+
"initializing",
2209+
"running",
2210+
"suspending",
2211+
"suspended",
2212+
"resuming",
2213+
"failure",
2214+
"shutdown",
21992215
]
22002216
| Omit = omit,
22012217
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.

src/runloop_api_client/types/devbox_list_params.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ class DevboxListParams(TypedDict, total=False):
2121
"""Load the next page of data starting after the item with the given ID."""
2222

2323
status: Literal[
24-
"provisioning", "initializing", "running", "suspending", "suspended", "resuming", "failure", "shutdown"
24+
"scheduled",
25+
"provisioning",
26+
"initializing",
27+
"running",
28+
"suspending",
29+
"suspended",
30+
"resuming",
31+
"failure",
32+
"shutdown",
2533
]
2634
"""Filter by status"""

src/runloop_api_client/types/devbox_view.py

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,30 @@
1212

1313
class StateTransition(BaseModel):
1414
status: Optional[
15-
Literal["provisioning", "initializing", "running", "suspending", "suspended", "resuming", "failure", "shutdown"]
15+
Literal[
16+
"scheduled",
17+
"provisioning",
18+
"initializing",
19+
"running",
20+
"suspending",
21+
"suspended",
22+
"resuming",
23+
"failure",
24+
"shutdown",
25+
]
1626
] = None
1727
"""The status of the Devbox.
1828
19-
provisioning: Runloop is allocating and booting the necessary infrastructure
20-
resources. initializing: Runloop defined boot scripts are running to enable the
21-
environment for interaction. running: The Devbox is ready for interaction.
22-
suspending: The Devbox disk is being snapshotted as part of suspension.
23-
suspended: The Devbox disk is saved and no more active compute is being used for
24-
the Devbox. resuming: The Devbox disk is being loaded as part of booting a
25-
suspended Devbox. failure: The Devbox failed as part of booting or running user
26-
requested actions. shutdown: The Devbox was successfully shutdown and no more
27-
active compute is being used.
29+
scheduled: The Devbox is scheduled to run but infrastructure allocation has not
30+
started yet. provisioning: Runloop is allocating and booting the necessary
31+
infrastructure resources. initializing: Runloop defined boot scripts are running
32+
to enable the environment for interaction. running: The Devbox is ready for
33+
interaction. suspending: The Devbox disk is being snapshotted as part of
34+
suspension. suspended: The Devbox disk is saved and no more active compute is
35+
being used for the Devbox. resuming: The Devbox disk is being loaded as part of
36+
booting a suspended Devbox. failure: The Devbox failed as part of booting or
37+
running user requested actions. shutdown: The Devbox was successfully shutdown
38+
and no more active compute is being used.
2839
"""
2940

3041
transition_time_ms: Optional[object] = None
@@ -78,7 +89,15 @@ class DevboxView(BaseModel):
7889
"""A list of state transitions in order with durations"""
7990

8091
status: Literal[
81-
"provisioning", "initializing", "running", "suspending", "suspended", "resuming", "failure", "shutdown"
92+
"scheduled",
93+
"provisioning",
94+
"initializing",
95+
"running",
96+
"suspending",
97+
"suspended",
98+
"resuming",
99+
"failure",
100+
"shutdown",
82101
]
83102
"""The current status of the Devbox."""
84103

tests/api_resources/test_devboxes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def test_method_list_with_all_params(self, client: Runloop) -> None:
250250
include_total_count=True,
251251
limit=0,
252252
starting_after="starting_after",
253-
status="provisioning",
253+
status="scheduled",
254254
)
255255
assert_matches_type(SyncDevboxesCursorIDPage[DevboxView], devbox, path=["response"])
256256

@@ -1919,7 +1919,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncRunloop) ->
19191919
include_total_count=True,
19201920
limit=0,
19211921
starting_after="starting_after",
1922-
status="provisioning",
1922+
status="scheduled",
19231923
)
19241924
assert_matches_type(AsyncDevboxesCursorIDPage[DevboxView], devbox, path=["response"])
19251925

0 commit comments

Comments
 (0)