Skip to content

Commit a727116

Browse files
authored
chore: remove deprecated --keep flag from docs, scripts, and e2e tests (#2126)
* docs: remove deprecated --keep flag from tutorials and examples The --keep flag is deprecated, hidden, and a no-op since sandboxes are kept by default. Remove references from tutorial docs and example READMEs that explain it as a real feature. - Remove --keep from sandbox create commands - Remove --keep explanation text - Clarify that sandboxes are kept by default Signed-off-by: Ignas Baranauskas <ibaranau@redhat.com> * chore: remove deprecated --keep usage from scripts and e2e tests The --keep flag is a deprecated no-op since sandboxes are kept by default. Stop passing it in internal scripts, e2e test scripts, and example demo scripts. Signed-off-by: Ignas Baranauskas <ibaranau@redhat.com> --------- Signed-off-by: Ignas Baranauskas <ibaranau@redhat.com>
1 parent abe42fb commit a727116

13 files changed

Lines changed: 14 additions & 25 deletions

File tree

docs/get-started/tutorials/first-network-policy.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ bash examples/sandbox-policy-quickstart/demo.sh
3838
Start by creating a sandbox with no network policies. This gives you a clean environment to observe default-deny behavior.
3939

4040
```shell
41-
openshell sandbox create --name demo --keep --no-auto-providers
41+
openshell sandbox create --name demo --no-auto-providers
4242
```
4343

44-
`--keep` keeps the sandbox running after you exit so you can reconnect later. `--no-auto-providers` skips the provider setup prompt since this tutorial uses `curl` instead of an AI agent.
44+
`--no-auto-providers` skips the provider setup prompt since this tutorial uses `curl` instead of an AI agent.
4545

4646
You land in an interactive shell inside the sandbox:
4747

@@ -65,7 +65,7 @@ The request fails. By default, all outbound network traffic is denied. The sandb
6565
curl: (56) Received HTTP code 403 from proxy after CONNECT
6666
```
6767

68-
Exit the sandbox. The `--keep` flag keeps it running:
68+
Exit the sandbox. Sandboxes are kept running by default, so you can reconnect later. Use `--no-keep` at creation time if you want the sandbox deleted after exit:
6969

7070
```shell
7171
exit

docs/get-started/tutorials/microsoft-graph-provider-refresh.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ Launch a sandbox with the Microsoft Graph provider attached:
160160
```shell
161161
openshell sandbox create \
162162
--name microsoft-graph-mail \
163-
--keep \
164163
--provider microsoft-mail \
165164
--no-auto-providers \
166165
-- /bin/sh

e2e/policy-advisor/mechanistic-smoke.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ create_sandbox() {
7878
--name "$SANDBOX" \
7979
--no-auto-providers \
8080
--no-tty \
81-
--keep \
8281
-- bash -lc "echo sandbox ready" \
8382
| sed 's/^/ /'
8483

e2e/policy-advisor/test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ create_sandbox() {
230230
--policy "$POLICY_FILE" \
231231
--upload "${RUNNER_SOURCE}:/sandbox/policy-validation-runner.sh" \
232232
--no-git-ignore \
233-
--keep \
234233
--no-auto-providers \
235234
--no-tty \
236235
-- bash -lc "chmod +x /sandbox/policy-validation-runner.sh && echo sandbox ready"

e2e/policy-advisor/wait-smoke.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ create_sandbox() {
128128
--name "$SANDBOX" \
129129
--upload "${RUNNER_SOURCE}:/sandbox/runner.sh" \
130130
--no-git-ignore \
131-
--keep \
132131
--no-auto-providers \
133132
--no-tty \
134133
-- bash -lc "chmod +x /sandbox/runner.sh && echo sandbox ready" \

examples/policy-advisor/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,12 @@ openshell sandbox create \
9090
--name advisor-ctf \
9191
--policy examples/policy-advisor/sandbox-policy.yaml \
9292
--upload examples/policy-advisor/ctf.py \
93-
--keep \
9493
-- python3 -u /sandbox/ctf.py
9594
```
9695

9796
> **For agents running this CTF:** use the command above exactly. The
98-
> `--upload` flag copies the script into `/sandbox/` before the command runs,
99-
> `--keep` prevents the sandbox from being torn down on exit, and `-u` gives
100-
> unbuffered output so you can see logs in real time.
97+
> `--upload` flag copies the script into `/sandbox/` before the command runs
98+
> and `-u` gives unbuffered output so you can see logs in real time.
10199
102100
The script prints a banner and immediately tries Gate 1 (`httpbin.org:443`).
103101
It will fail with **"blocked by sandbox proxy"** and begin retrying every 10

examples/sandbox-policy-quickstart/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ while writes are blocked — all without restarting anything.
2222
### 1. Create a sandbox
2323

2424
```bash
25-
openshell sandbox create --name demo --keep --no-auto-providers
25+
openshell sandbox create --name demo --no-auto-providers
2626
```
2727

28-
`--keep` keeps the sandbox running after you exit so you can reconnect
29-
later. `--no-auto-providers` skips the provider setup prompt since this
28+
`--no-auto-providers` skips the provider setup prompt since this
3029
demo doesn't use an AI agent.
3130

3231
You'll land in an interactive shell inside the sandbox:
@@ -50,7 +49,7 @@ The sandbox proxy intercepted the HTTPS CONNECT request to
5049
curl: (56) Received HTTP code 403 from proxy after CONNECT
5150
```
5251

53-
Exit the sandbox (the sandbox stays alive thanks to `--keep`):
52+
Exit the sandbox (sandboxes are kept running by default; pass `--no-keep` at creation time to delete on exit):
5453

5554
```bash
5655
exit

examples/sandbox-policy-quickstart/demo.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ wait_for_ssh() {
8686
step "1/7 Creating sandbox \"${SANDBOX_NAME}\" (default-deny networking)"
8787
run openshell sandbox create \
8888
--name "$SANDBOX_NAME" \
89-
--keep \
9089
--no-auto-providers \
9190
--no-tty \
9291
-- echo "sandbox ready"

examples/spiffe-token-grant-demo/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ openshell --gateway-endpoint "$GATEWAY" provider create \
7474
openshell --gateway-endpoint "$GATEWAY" sandbox create \
7575
--name spiffe-token-demo \
7676
--provider spiffe-token-demo \
77-
--keep \
7877
--no-tty \
7978
-- echo "sandbox ready"
8079

examples/spiffe-token-grant-demo/demo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ run "${OS[@]}" settings set --global --key providers_v2_enabled --value true --y
115115
run "${OS[@]}" provider profile lint -f "$PROFILE_FILE"
116116
run "${OS[@]}" provider profile import -f "$PROFILE_FILE"
117117
run "${OS[@]}" provider create --name "$PROVIDER_NAME" --type "$PROFILE_ID" --runtime-credentials
118-
run "${OS[@]}" sandbox create --name "$SANDBOX_NAME" --provider "$PROVIDER_NAME" --keep --no-tty -- echo "sandbox ready"
118+
run "${OS[@]}" sandbox create --name "$SANDBOX_NAME" --provider "$PROVIDER_NAME" --no-tty -- echo "sandbox ready"
119119

120120
sandbox_curl_until "alpha" "http://alpha.default.svc.cluster.local/" "alpha called with path /:"
121121
ALPHA_OUTPUT="$SANDBOX_CURL_OUTPUT"

0 commit comments

Comments
 (0)