Skip to content

Commit 9dfa3ad

Browse files
feat: Add wake on axon event as an API primitive (#8681)
1 parent 11d7062 commit 9dfa3ad

7 files changed

Lines changed: 72 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: 112
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-f1ad4729124d46b6b2f926f177680a9644c6701d7e7c87731df9bf21a6414546.yml
3-
openapi_spec_hash: eb49220bba68581587f2d9d4d79d0c7e
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-5b536a11a713dd4e47b270c130368dbfdf1f30282f262c160cd0411fcd291806.yml
3+
openapi_spec_hash: f94d993a7f34461ebde7d0186e8e3c3a
44
config_hash: 636a44fb2f5d76373805b629a0f3dd35

src/runloop_api_client/types/shared/launch_parameters.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
class LifecycleResumeTriggers(BaseModel):
1313
"""Triggers that can resume a suspended Devbox."""
1414

15+
axon_event: Optional[bool] = None
16+
"""When true, axon events targeting a suspended Devbox will trigger a resume."""
17+
1518
http: Optional[bool] = None
1619
"""When true, HTTP traffic to a suspended Devbox via tunnel will trigger a resume."""
1720

src/runloop_api_client/types/shared_params/launch_parameters.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
class LifecycleResumeTriggers(TypedDict, total=False):
1515
"""Triggers that can resume a suspended Devbox."""
1616

17+
axon_event: Optional[bool]
18+
"""When true, axon events targeting a suspended Devbox will trigger a resume."""
19+
1720
http: Optional[bool]
1821
"""When true, HTTP traffic to a suspended Devbox via tunnel will trigger a resume."""
1922

tests/api_resources/test_benchmarks.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,10 @@ def test_method_start_run_with_all_params(self, client: Runloop) -> None:
304304
"idle_time_seconds": 0,
305305
"on_idle": "shutdown",
306306
},
307-
"resume_triggers": {"http": True},
307+
"resume_triggers": {
308+
"axon_event": True,
309+
"http": True,
310+
},
308311
},
309312
"network_policy_id": "network_policy_id",
310313
"required_services": ["string"],
@@ -686,7 +689,10 @@ async def test_method_start_run_with_all_params(self, async_client: AsyncRunloop
686689
"idle_time_seconds": 0,
687690
"on_idle": "shutdown",
688691
},
689-
"resume_triggers": {"http": True},
692+
"resume_triggers": {
693+
"axon_event": True,
694+
"http": True,
695+
},
690696
},
691697
"network_policy_id": "network_policy_id",
692698
"required_services": ["string"],

tests/api_resources/test_blueprints.py

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ def test_method_create_with_all_params(self, client: Runloop) -> None:
7070
"idle_time_seconds": 0,
7171
"on_idle": "shutdown",
7272
},
73-
"resume_triggers": {"http": True},
73+
"resume_triggers": {
74+
"axon_event": True,
75+
"http": True,
76+
},
7477
},
7578
"network_policy_id": "network_policy_id",
7679
"required_services": ["string"],
@@ -292,7 +295,10 @@ def test_method_create_from_inspection_with_all_params(self, client: Runloop) ->
292295
"idle_time_seconds": 0,
293296
"on_idle": "shutdown",
294297
},
295-
"resume_triggers": {"http": True},
298+
"resume_triggers": {
299+
"axon_event": True,
300+
"http": True,
301+
},
296302
},
297303
"network_policy_id": "network_policy_id",
298304
"required_services": ["string"],
@@ -458,7 +464,10 @@ def test_method_preview_with_all_params(self, client: Runloop) -> None:
458464
"idle_time_seconds": 0,
459465
"on_idle": "shutdown",
460466
},
461-
"resume_triggers": {"http": True},
467+
"resume_triggers": {
468+
"axon_event": True,
469+
"http": True,
470+
},
462471
},
463472
"network_policy_id": "network_policy_id",
464473
"required_services": ["string"],
@@ -567,7 +576,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -
567576
"idle_time_seconds": 0,
568577
"on_idle": "shutdown",
569578
},
570-
"resume_triggers": {"http": True},
579+
"resume_triggers": {
580+
"axon_event": True,
581+
"http": True,
582+
},
571583
},
572584
"network_policy_id": "network_policy_id",
573585
"required_services": ["string"],
@@ -789,7 +801,10 @@ async def test_method_create_from_inspection_with_all_params(self, async_client:
789801
"idle_time_seconds": 0,
790802
"on_idle": "shutdown",
791803
},
792-
"resume_triggers": {"http": True},
804+
"resume_triggers": {
805+
"axon_event": True,
806+
"http": True,
807+
},
793808
},
794809
"network_policy_id": "network_policy_id",
795810
"required_services": ["string"],
@@ -955,7 +970,10 @@ async def test_method_preview_with_all_params(self, async_client: AsyncRunloop)
955970
"idle_time_seconds": 0,
956971
"on_idle": "shutdown",
957972
},
958-
"resume_triggers": {"http": True},
973+
"resume_triggers": {
974+
"axon_event": True,
975+
"http": True,
976+
},
959977
},
960978
"network_policy_id": "network_policy_id",
961979
"required_services": ["string"],

tests/api_resources/test_devboxes.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ def test_method_create_with_all_params(self, client: Runloop) -> None:
9090
"idle_time_seconds": 0,
9191
"on_idle": "shutdown",
9292
},
93-
"resume_triggers": {"http": True},
93+
"resume_triggers": {
94+
"axon_event": True,
95+
"http": True,
96+
},
9497
},
9598
"network_policy_id": "network_policy_id",
9699
"required_services": ["string"],
@@ -1714,7 +1717,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -
17141717
"idle_time_seconds": 0,
17151718
"on_idle": "shutdown",
17161719
},
1717-
"resume_triggers": {"http": True},
1720+
"resume_triggers": {
1721+
"axon_event": True,
1722+
"http": True,
1723+
},
17181724
},
17191725
"network_policy_id": "network_policy_id",
17201726
"required_services": ["string"],

tests/api_resources/test_scenarios.py

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ def test_method_create_with_all_params(self, client: Runloop) -> None:
8383
"idle_time_seconds": 0,
8484
"on_idle": "shutdown",
8585
},
86-
"resume_triggers": {"http": True},
86+
"resume_triggers": {
87+
"axon_event": True,
88+
"http": True,
89+
},
8790
},
8891
"network_policy_id": "network_policy_id",
8992
"required_services": ["string"],
@@ -225,7 +228,10 @@ def test_method_update_with_all_params(self, client: Runloop) -> None:
225228
"idle_time_seconds": 0,
226229
"on_idle": "shutdown",
227230
},
228-
"resume_triggers": {"http": True},
231+
"resume_triggers": {
232+
"axon_event": True,
233+
"http": True,
234+
},
229235
},
230236
"network_policy_id": "network_policy_id",
231237
"required_services": ["string"],
@@ -440,7 +446,10 @@ def test_method_start_run_with_all_params(self, client: Runloop) -> None:
440446
"idle_time_seconds": 0,
441447
"on_idle": "shutdown",
442448
},
443-
"resume_triggers": {"http": True},
449+
"resume_triggers": {
450+
"axon_event": True,
451+
"http": True,
452+
},
444453
},
445454
"network_policy_id": "network_policy_id",
446455
"required_services": ["string"],
@@ -555,7 +564,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -
555564
"idle_time_seconds": 0,
556565
"on_idle": "shutdown",
557566
},
558-
"resume_triggers": {"http": True},
567+
"resume_triggers": {
568+
"axon_event": True,
569+
"http": True,
570+
},
559571
},
560572
"network_policy_id": "network_policy_id",
561573
"required_services": ["string"],
@@ -697,7 +709,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncRunloop) -
697709
"idle_time_seconds": 0,
698710
"on_idle": "shutdown",
699711
},
700-
"resume_triggers": {"http": True},
712+
"resume_triggers": {
713+
"axon_event": True,
714+
"http": True,
715+
},
701716
},
702717
"network_policy_id": "network_policy_id",
703718
"required_services": ["string"],
@@ -912,7 +927,10 @@ async def test_method_start_run_with_all_params(self, async_client: AsyncRunloop
912927
"idle_time_seconds": 0,
913928
"on_idle": "shutdown",
914929
},
915-
"resume_triggers": {"http": True},
930+
"resume_triggers": {
931+
"axon_event": True,
932+
"http": True,
933+
},
916934
},
917935
"network_policy_id": "network_policy_id",
918936
"required_services": ["string"],

0 commit comments

Comments
 (0)