Skip to content

Commit 63ac31a

Browse files
feat(api): add terminal field to RunsOn
1 parent bce5c4d commit 63ac31a

6 files changed

Lines changed: 27 additions & 3 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 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-ed3a1c285331386ba5056502d899a2e4659e9e738e9c126bee45fc101ca1e146.yml
3-
openapi_spec_hash: 367ebe7e572da1892a3eaae9344cfcba
4-
config_hash: 7a2cbe5967b1eef12830d2a23fc32c83
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-a43265810afa7f7c50a08fec12012d5109ecad109105f5c6cf4205f9114ad5fc.yml
3+
openapi_spec_hash: 44434ed0762787b31c9ecec5f670fae5
4+
config_hash: 63777babba88b7fa1dbf28164294eaed

src/gitpod/types/shared/runs_on.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ class RunsOn(BaseModel):
1818

1919
machine: Optional[object] = None
2020
"""Machine runs the service/task directly on the VM/machine level."""
21+
22+
terminal: Optional[object] = None
23+
"""
24+
Terminal runs the service inside a managed PTY terminal in the devcontainer.
25+
Users can attach to the terminal interactively via the terminal API.
26+
"""

src/gitpod/types/shared_params/runs_on.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,9 @@ class RunsOn(TypedDict, total=False):
2020

2121
machine: object
2222
"""Machine runs the service/task directly on the VM/machine level."""
23+
24+
terminal: object
25+
"""
26+
Terminal runs the service inside a managed PTY terminal in the devcontainer.
27+
Users can attach to the terminal interactively via the terminal API.
28+
"""

tests/api_resources/environments/automations/test_services.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None:
7575
"image": "x",
7676
},
7777
"machine": {},
78+
"terminal": {},
7879
},
7980
"session": "session",
8081
"spec_version": "specVersion",
@@ -187,6 +188,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None:
187188
"image": "x",
188189
},
189190
"machine": {},
191+
"terminal": {},
190192
},
191193
},
192194
status={
@@ -435,6 +437,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) ->
435437
"image": "x",
436438
},
437439
"machine": {},
440+
"terminal": {},
438441
},
439442
"session": "session",
440443
"spec_version": "specVersion",
@@ -547,6 +550,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) ->
547550
"image": "x",
548551
},
549552
"machine": {},
553+
"terminal": {},
550554
},
551555
},
552556
status={

tests/api_resources/environments/automations/test_tasks.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None:
7171
"image": "x",
7272
},
7373
"machine": {},
74+
"terminal": {},
7475
},
7576
},
7677
)
@@ -177,6 +178,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None:
177178
"image": "x",
178179
},
179180
"machine": {},
181+
"terminal": {},
180182
},
181183
},
182184
)
@@ -375,6 +377,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) ->
375377
"image": "x",
376378
},
377379
"machine": {},
380+
"terminal": {},
378381
},
379382
},
380383
)
@@ -481,6 +484,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) ->
481484
"image": "x",
482485
},
483486
"machine": {},
487+
"terminal": {},
484488
},
485489
},
486490
)

tests/api_resources/environments/test_automations.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def test_method_upsert_with_all_params(self, client: Gitpod) -> None:
4444
"image": "x",
4545
},
4646
"machine": {},
47+
"terminal": {},
4748
},
4849
"triggered_by": ["postDevcontainerStart"],
4950
}
@@ -60,6 +61,7 @@ def test_method_upsert_with_all_params(self, client: Gitpod) -> None:
6061
"image": "x",
6162
},
6263
"machine": {},
64+
"terminal": {},
6365
},
6466
"triggered_by": ["postEnvironmentStart"],
6567
}
@@ -124,6 +126,7 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncGitpod) ->
124126
"image": "x",
125127
},
126128
"machine": {},
129+
"terminal": {},
127130
},
128131
"triggered_by": ["postDevcontainerStart"],
129132
}
@@ -140,6 +143,7 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncGitpod) ->
140143
"image": "x",
141144
},
142145
"machine": {},
146+
"terminal": {},
143147
},
144148
"triggered_by": ["postEnvironmentStart"],
145149
}

0 commit comments

Comments
 (0)