Skip to content

chore: remove deprecated --keep flag from docs, scripts, and e2e tests#2126

Open
Ygnas wants to merge 2 commits into
NVIDIA:mainfrom
Ygnas:remove-deprecated-keep-flag-docs/Ygnas
Open

chore: remove deprecated --keep flag from docs, scripts, and e2e tests#2126
Ygnas wants to merge 2 commits into
NVIDIA:mainfrom
Ygnas:remove-deprecated-keep-flag-docs/Ygnas

Conversation

@Ygnas

@Ygnas Ygnas commented Jul 3, 2026

Copy link
Copy Markdown

Summary

Remove references to the deprecated --keep flag from tutorials, example
READMEs, internal scripts, and e2e test scripts. The flag is hidden
(hide = true), deprecated, and a no-op since sandboxes are kept by default.
Users and scripts were using a flag that does nothing.

The --keep flag definition in the CLI is not removed — it remains as a
hidden, backward-compatible no-op for external users who may depend on it.

Related Issue

N/A — standalone cleanup. The --keep flag is declared deprecated
at crates/openshell-cli/src/main.rs:1247-1249.

Changes

  • Remove --keep from sandbox create commands in tutorials, examples,
    internal scripts, and e2e test scripts
  • Remove --keep explanation text that described it as a real feature
  • Add --no-keep mentions where sandbox persistence is explained, so users
    know how to opt into auto-deletion
  • Update comments to reflect that sandboxes are kept by default

Files changed

  • docs/get-started/tutorials/first-network-policy.mdx
  • docs/get-started/tutorials/microsoft-graph-provider-refresh.mdx
  • examples/sandbox-policy-quickstart/README.md
  • examples/policy-advisor/README.md
  • examples/spiffe-token-grant-demo/README.md
  • scripts/agents/gator/README.md
  • scripts/smoke-test-network-policy.sh
  • examples/sandbox-policy-quickstart/demo.sh
  • examples/spiffe-token-grant-demo/demo.sh
  • tasks/scripts/vm/smoke-orphan-cleanup.sh
  • e2e/policy-advisor/test.sh
  • e2e/policy-advisor/wait-smoke.sh
  • e2e/policy-advisor/mechanistic-smoke.sh

Intentionally left unchanged

  • scripts/agents/run.sh — Has its own --keep flag that controls
    whether --no-keep is passed to the CLI. Already correctly adapted.
  • e2e/rust/src/harness/sandbox.rscreate_keep() passes --keep
    to the CLI, providing implicit backward-compatibility test coverage.
  • e2e/rust/tests/sync.rs and live_policy_update.rs — Comments
    reference --keep in the context of the Rust test harness above.

Testing

  • mise run test passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

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>
@Ygnas Ygnas requested review from a team, derekwaynecarr, maxamillion and mrunalp as code owners July 3, 2026 11:20
@copy-pr-bot

copy-pr-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

@Ygnas

Ygnas commented Jul 3, 2026

Copy link
Copy Markdown
Author

I have read the DCO document and I hereby sign the DCO.

@Ygnas

Ygnas commented Jul 3, 2026

Copy link
Copy Markdown
Author

recheck

@elezar elezar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Ygnas. I think we can also remove the references to --keep in the internal scripts.

@elezar elezar self-assigned this Jul 3, 2026
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>
@Ygnas Ygnas changed the title docs: remove deprecated --keep flag from tutorials and examples chore: remove deprecated --keep flag from docs, scripts, and e2e tests Jul 3, 2026
@Ygnas Ygnas requested a review from elezar July 3, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants