Skip to content

Commit 855d22d

Browse files
author
stlc-bot
committed
feat(exec)!: remove stateful shell execution from the exec stack
Stainless-Generated-From: 8b5df59cd1632fd39ddc23c9abe1dd7162d3d788
1 parent d0caf3e commit 855d22d

13 files changed

Lines changed: 28 additions & 185 deletions

‎scripts/mock‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎src/runloop_api_client/resources/devboxes/devboxes.py‎

Lines changed: 12 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,6 @@ def execute(
981981
command_id: str | None = None,
982982
last_n: str | Omit = omit,
983983
optimistic_timeout: Optional[int] | Omit = omit,
984-
shell_name: Optional[str] | Omit = omit,
985984
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
986985
# The extra values given here take precedence over values defined on the client or passed to this method.
987986
extra_headers: Headers | None = None,
@@ -998,10 +997,8 @@ def execute(
998997
support.
999998
1000999
Args:
1001-
command: The command to execute via the Devbox shell. By default, commands are run from
1002-
the user home directory unless shell_name is specified. If shell_name is
1003-
specified the command is run from the directory based on the recent state of the
1004-
persistent shell.
1000+
command: The command to execute via the Devbox shell. Commands are run from the user home
1001+
directory in a fresh login shell.
10051002
10061003
command_id: The command ID in UUIDv7 string format for idempotency and tracking.
10071004
A fresh UUID is generated per call if not provided.
@@ -1011,10 +1008,6 @@ def execute(
10111008
optimistic_timeout: Timeout in seconds to wait for command completion, up to 25 seconds. Defaults to
10121009
25 seconds. Operation is not killed.
10131010
1014-
shell_name: The name of the persistent shell to create or use if already created. When using
1015-
a persistent shell, the command will run from the directory at the end of the
1016-
previous command and environment variables will be preserved.
1017-
10181011
extra_headers: Send extra headers
10191012
10201013
extra_query: Add additional query parameters to the request
@@ -1038,7 +1031,6 @@ def execute(
10381031
"command": command,
10391032
"command_id": command_id,
10401033
"optimistic_timeout": optimistic_timeout,
1041-
"shell_name": shell_name,
10421034
},
10431035
devbox_execute_params.DevboxExecuteParams,
10441036
),
@@ -1129,7 +1121,6 @@ def execute_async(
11291121
*,
11301122
command: str,
11311123
attach_stdin: Optional[bool] | Omit = omit,
1132-
shell_name: Optional[str] | Omit = omit,
11331124
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
11341125
# The extra values given here take precedence over values defined on the client or passed to this method.
11351126
extra_headers: Headers | None = None,
@@ -1143,18 +1134,12 @@ def execute_async(
11431134
execution that can be used to track the command's progress.
11441135
11451136
Args:
1146-
command: The command to execute via the Devbox shell. By default, commands are run from
1147-
the user home directory unless shell_name is specified. If shell_name is
1148-
specified the command is run from the directory based on the recent state of the
1149-
persistent shell.
1137+
command: The command to execute via the Devbox shell. Commands are run from the user home
1138+
directory in a fresh login shell.
11501139
11511140
attach_stdin: Whether to attach stdin streaming for async commands. Not valid for execute_sync
11521141
endpoint. Defaults to false if not specified.
11531142
1154-
shell_name: The name of the persistent shell to create or use if already created. When using
1155-
a persistent shell, the command will run from the directory at the end of the
1156-
previous command and environment variables will be preserved.
1157-
11581143
extra_headers: Send extra headers
11591144
11601145
extra_query: Add additional query parameters to the request
@@ -1173,7 +1158,6 @@ def execute_async(
11731158
{
11741159
"command": command,
11751160
"attach_stdin": attach_stdin,
1176-
"shell_name": shell_name,
11771161
},
11781162
devbox_execute_async_params.DevboxExecuteAsyncParams,
11791163
),
@@ -1195,7 +1179,6 @@ def execute_sync(
11951179
*,
11961180
command: str,
11971181
attach_stdin: Optional[bool] | Omit = omit,
1198-
shell_name: Optional[str] | Omit = omit,
11991182
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
12001183
# The extra values given here take precedence over values defined on the client or passed to this method.
12011184
extra_headers: Headers | None = None,
@@ -1213,18 +1196,12 @@ def execute_sync(
12131196
Use execute, execute_async, or execute_and_await_completion instead.
12141197
12151198
Args:
1216-
command: The command to execute via the Devbox shell. By default, commands are run from
1217-
the user home directory unless shell_name is specified. If shell_name is
1218-
specified the command is run from the directory based on the recent state of the
1219-
persistent shell.
1199+
command: The command to execute via the Devbox shell. Commands are run from the user home
1200+
directory in a fresh login shell.
12201201
12211202
attach_stdin: Whether to attach stdin streaming for async commands. Not valid for execute_sync
12221203
endpoint. Defaults to false if not specified.
12231204
1224-
shell_name: The name of the persistent shell to create or use if already created. When using
1225-
a persistent shell, the command will run from the directory at the end of the
1226-
previous command and environment variables will be preserved.
1227-
12281205
extra_headers: Send extra headers
12291206
12301207
extra_query: Add additional query parameters to the request
@@ -1245,7 +1222,6 @@ def execute_sync(
12451222
{
12461223
"command": command,
12471224
"attach_stdin": attach_stdin,
1248-
"shell_name": shell_name,
12491225
},
12501226
devbox_execute_sync_params.DevboxExecuteSyncParams,
12511227
),
@@ -2819,7 +2795,6 @@ async def execute(
28192795
command_id: str | None = None,
28202796
last_n: str | Omit = omit,
28212797
optimistic_timeout: Optional[int] | Omit = omit,
2822-
shell_name: Optional[str] | Omit = omit,
28232798
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
28242799
# The extra values given here take precedence over values defined on the client or passed to this method.
28252800
extra_headers: Headers | None = None,
@@ -2836,10 +2811,8 @@ async def execute(
28362811
support.
28372812
28382813
Args:
2839-
command: The command to execute via the Devbox shell. By default, commands are run from
2840-
the user home directory unless shell_name is specified. If shell_name is
2841-
specified the command is run from the directory based on the recent state of the
2842-
persistent shell.
2814+
command: The command to execute via the Devbox shell. Commands are run from the user home
2815+
directory in a fresh login shell.
28432816
28442817
command_id: The command ID in UUIDv7 string format for idempotency and tracking.
28452818
A fresh UUID is generated per call if not provided.
@@ -2849,10 +2822,6 @@ async def execute(
28492822
optimistic_timeout: Timeout in seconds to wait for command completion, up to 25 seconds. Defaults to
28502823
25 seconds. Operation is not killed.
28512824
2852-
shell_name: The name of the persistent shell to create or use if already created. When using
2853-
a persistent shell, the command will run from the directory at the end of the
2854-
previous command and environment variables will be preserved.
2855-
28562825
extra_headers: Send extra headers
28572826
28582827
extra_query: Add additional query parameters to the request
@@ -2876,7 +2845,6 @@ async def execute(
28762845
"command": command,
28772846
"command_id": command_id,
28782847
"optimistic_timeout": optimistic_timeout,
2879-
"shell_name": shell_name,
28802848
},
28812849
devbox_execute_params.DevboxExecuteParams,
28822850
),
@@ -2966,7 +2934,6 @@ async def execute_async(
29662934
*,
29672935
command: str,
29682936
attach_stdin: Optional[bool] | Omit = omit,
2969-
shell_name: Optional[str] | Omit = omit,
29702937
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
29712938
# The extra values given here take precedence over values defined on the client or passed to this method.
29722939
extra_headers: Headers | None = None,
@@ -2980,18 +2947,12 @@ async def execute_async(
29802947
execution that can be used to track the command's progress.
29812948
29822949
Args:
2983-
command: The command to execute via the Devbox shell. By default, commands are run from
2984-
the user home directory unless shell_name is specified. If shell_name is
2985-
specified the command is run from the directory based on the recent state of the
2986-
persistent shell.
2950+
command: The command to execute via the Devbox shell. Commands are run from the user home
2951+
directory in a fresh login shell.
29872952
29882953
attach_stdin: Whether to attach stdin streaming for async commands. Not valid for execute_sync
29892954
endpoint. Defaults to false if not specified.
29902955
2991-
shell_name: The name of the persistent shell to create or use if already created. When using
2992-
a persistent shell, the command will run from the directory at the end of the
2993-
previous command and environment variables will be preserved.
2994-
29952956
extra_headers: Send extra headers
29962957
29972958
extra_query: Add additional query parameters to the request
@@ -3010,7 +2971,6 @@ async def execute_async(
30102971
{
30112972
"command": command,
30122973
"attach_stdin": attach_stdin,
3013-
"shell_name": shell_name,
30142974
},
30152975
devbox_execute_async_params.DevboxExecuteAsyncParams,
30162976
),
@@ -3032,7 +2992,6 @@ async def execute_sync(
30322992
*,
30332993
command: str,
30342994
attach_stdin: Optional[bool] | Omit = omit,
3035-
shell_name: Optional[str] | Omit = omit,
30362995
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
30372996
# The extra values given here take precedence over values defined on the client or passed to this method.
30382997
extra_headers: Headers | None = None,
@@ -3050,18 +3009,12 @@ async def execute_sync(
30503009
Use execute, execute_async, or execute_and_await_completion instead.
30513010
30523011
Args:
3053-
command: The command to execute via the Devbox shell. By default, commands are run from
3054-
the user home directory unless shell_name is specified. If shell_name is
3055-
specified the command is run from the directory based on the recent state of the
3056-
persistent shell.
3012+
command: The command to execute via the Devbox shell. Commands are run from the user home
3013+
directory in a fresh login shell.
30573014
30583015
attach_stdin: Whether to attach stdin streaming for async commands. Not valid for execute_sync
30593016
endpoint. Defaults to false if not specified.
30603017
3061-
shell_name: The name of the persistent shell to create or use if already created. When using
3062-
a persistent shell, the command will run from the directory at the end of the
3063-
previous command and environment variables will be preserved.
3064-
30653018
extra_headers: Send extra headers
30663019
30673020
extra_query: Add additional query parameters to the request
@@ -3082,7 +3035,6 @@ async def execute_sync(
30823035
{
30833036
"command": command,
30843037
"attach_stdin": attach_stdin,
3085-
"shell_name": shell_name,
30863038
},
30873039
devbox_execute_sync_params.DevboxExecuteSyncParams,
30883040
),

‎src/runloop_api_client/resources/devboxes/executions.py‎

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ def execute_async(
158158
*,
159159
command: str,
160160
attach_stdin: Optional[bool] | Omit = omit,
161-
shell_name: Optional[str] | Omit = omit,
162161
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
163162
# The extra values given here take precedence over values defined on the client or passed to this method.
164163
extra_headers: Headers | None = None,
@@ -172,18 +171,12 @@ def execute_async(
172171
execution that can be used to track the command's progress.
173172
174173
Args:
175-
command: The command to execute via the Devbox shell. By default, commands are run from
176-
the user home directory unless shell_name is specified. If shell_name is
177-
specified the command is run from the directory based on the recent state of the
178-
persistent shell.
174+
command: The command to execute via the Devbox shell. Commands are run from the user home
175+
directory in a fresh login shell.
179176
180177
attach_stdin: Whether to attach stdin streaming for async commands. Not valid for execute_sync
181178
endpoint. Defaults to false if not specified.
182179
183-
shell_name: The name of the persistent shell to create or use if already created. When using
184-
a persistent shell, the command will run from the directory at the end of the
185-
previous command and environment variables will be preserved.
186-
187180
extra_headers: Send extra headers
188181
189182
extra_query: Add additional query parameters to the request
@@ -202,7 +195,6 @@ def execute_async(
202195
{
203196
"command": command,
204197
"attach_stdin": attach_stdin,
205-
"shell_name": shell_name,
206198
},
207199
execution_execute_async_params.ExecutionExecuteAsyncParams,
208200
),
@@ -223,7 +215,6 @@ def execute_sync(
223215
*,
224216
command: str,
225217
attach_stdin: Optional[bool] | Omit = omit,
226-
shell_name: Optional[str] | Omit = omit,
227218
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
228219
# The extra values given here take precedence over values defined on the client or passed to this method.
229220
extra_headers: Headers | None = None,
@@ -238,18 +229,12 @@ def execute_sync(
238229
execution.
239230
240231
Args:
241-
command: The command to execute via the Devbox shell. By default, commands are run from
242-
the user home directory unless shell_name is specified. If shell_name is
243-
specified the command is run from the directory based on the recent state of the
244-
persistent shell.
232+
command: The command to execute via the Devbox shell. Commands are run from the user home
233+
directory in a fresh login shell.
245234
246235
attach_stdin: Whether to attach stdin streaming for async commands. Not valid for execute_sync
247236
endpoint. Defaults to false if not specified.
248237
249-
shell_name: The name of the persistent shell to create or use if already created. When using
250-
a persistent shell, the command will run from the directory at the end of the
251-
previous command and environment variables will be preserved.
252-
253238
extra_headers: Send extra headers
254239
255240
extra_query: Add additional query parameters to the request
@@ -270,7 +255,6 @@ def execute_sync(
270255
{
271256
"command": command,
272257
"attach_stdin": attach_stdin,
273-
"shell_name": shell_name,
274258
},
275259
execution_execute_sync_params.ExecutionExecuteSyncParams,
276260
),
@@ -694,7 +678,6 @@ async def execute_async(
694678
*,
695679
command: str,
696680
attach_stdin: Optional[bool] | Omit = omit,
697-
shell_name: Optional[str] | Omit = omit,
698681
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
699682
# The extra values given here take precedence over values defined on the client or passed to this method.
700683
extra_headers: Headers | None = None,
@@ -708,18 +691,12 @@ async def execute_async(
708691
execution that can be used to track the command's progress.
709692
710693
Args:
711-
command: The command to execute via the Devbox shell. By default, commands are run from
712-
the user home directory unless shell_name is specified. If shell_name is
713-
specified the command is run from the directory based on the recent state of the
714-
persistent shell.
694+
command: The command to execute via the Devbox shell. Commands are run from the user home
695+
directory in a fresh login shell.
715696
716697
attach_stdin: Whether to attach stdin streaming for async commands. Not valid for execute_sync
717698
endpoint. Defaults to false if not specified.
718699
719-
shell_name: The name of the persistent shell to create or use if already created. When using
720-
a persistent shell, the command will run from the directory at the end of the
721-
previous command and environment variables will be preserved.
722-
723700
extra_headers: Send extra headers
724701
725702
extra_query: Add additional query parameters to the request
@@ -738,7 +715,6 @@ async def execute_async(
738715
{
739716
"command": command,
740717
"attach_stdin": attach_stdin,
741-
"shell_name": shell_name,
742718
},
743719
execution_execute_async_params.ExecutionExecuteAsyncParams,
744720
),
@@ -759,7 +735,6 @@ async def execute_sync(
759735
*,
760736
command: str,
761737
attach_stdin: Optional[bool] | Omit = omit,
762-
shell_name: Optional[str] | Omit = omit,
763738
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
764739
# The extra values given here take precedence over values defined on the client or passed to this method.
765740
extra_headers: Headers | None = None,
@@ -774,18 +749,12 @@ async def execute_sync(
774749
execution.
775750
776751
Args:
777-
command: The command to execute via the Devbox shell. By default, commands are run from
778-
the user home directory unless shell_name is specified. If shell_name is
779-
specified the command is run from the directory based on the recent state of the
780-
persistent shell.
752+
command: The command to execute via the Devbox shell. Commands are run from the user home
753+
directory in a fresh login shell.
781754
782755
attach_stdin: Whether to attach stdin streaming for async commands. Not valid for execute_sync
783756
endpoint. Defaults to false if not specified.
784757
785-
shell_name: The name of the persistent shell to create or use if already created. When using
786-
a persistent shell, the command will run from the directory at the end of the
787-
previous command and environment variables will be preserved.
788-
789758
extra_headers: Send extra headers
790759
791760
extra_query: Add additional query parameters to the request
@@ -806,7 +775,6 @@ async def execute_sync(
806775
{
807776
"command": command,
808777
"attach_stdin": attach_stdin,
809-
"shell_name": shell_name,
810778
},
811779
execution_execute_sync_params.ExecutionExecuteSyncParams,
812780
),

0 commit comments

Comments
 (0)