Skip to content

feat(k8s): preview requests in dry run for cluster commands - #2839

Merged
dan-petty merged 1 commit into
mainfrom
feat/2238-k8s-cluster-dry-run
Oct 31, 2026
Merged

dan-petty merged 1 commit into
mainfrom
feat/2238-k8s-cluster-dry-run

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Summary

  • Add dry-run support for 14 Kubernetes cluster read and access commands.
  • Classify 11 commands as request-plan: k8s audit, k8s contexts, k8s logs, k8s pods, k8s port-forward, k8s rbac-audit, k8s security-stream, k8s service-url, k8s status, k8s stream-logs, and k8s switch-context.
  • Classify 2 commands as no-external-request: k8s gpu-matrix and k8s port-forward-status.
  • Classify 1 command as no-external-request with local preview: k8s port-forward-stop (accepts --dry-run and terminates zero daemons).
  • When --dry-run is supplied, preview the planned kubectl/Loki/Popeye requests and execute zero network, socket, or subprocess calls.
  • Remove all 14 commands from tests/fixtures/dry_run_gaps.json.
  • Regenerate documentation and CLI references.

Verification

  • Ran test suite in tests/commands/test_k8s_dry_run.py (28 passed).
  • Verified ratchet invariant tests in tests/invariants/test_dry_run_class_ratchet.py (7 passed).
  • Ran k8s test suite in tests/commands/k8s/ (503 passed).
  • Verified OpenSpec validation: uv run devops openspec archive 2238-k8s-cluster-dry-run.
  • Passed fast static quality gates: python version, lint, format, actionlint, zizmor.

Closes #2238

@dan-petty dan-petty added type/feature Type feature: a new function scope/k8s Kubernetes commands, Helm charts, pods, services, and policies labels Oct 31, 2026
@dan-petty
dan-petty force-pushed the feat/2238-k8s-cluster-dry-run branch from e0494b5 to d1080f2 Compare October 31, 2026 06:06
## Summary
- Add dry-run support for 14 Kubernetes cluster read and access commands.
- Classify 11 commands as request-plan: k8s audit, contexts, logs, pods, port-forward, rbac-audit, security-stream, service-url, status, stream-logs, and switch-context.
- Classify 2 commands as no-external-request: k8s gpu-matrix and port-forward-status.
- Classify 1 command as no-external-request with local preview: k8s port-forward-stop (accepts --dry-run and terminates zero daemons).
- When --dry-run is supplied, preview the planned kubectl/Loki/Popeye requests and execute zero network, socket, or subprocess calls.
- Remove all 14 commands from dry_run_gaps.json.
- Regenerate documentation and CLI references.

## Verification
- Ran test suite in tests/commands/test_k8s_dry_run.py (28 passed).
- Verified ratchet invariant tests in tests/invariants/test_dry_run_class_ratchet.py (7 passed).
- Ran k8s test suite in tests/commands/k8s/ (503 passed).
- Verified OpenSpec validation: uv run devops openspec archive 2238-k8s-cluster-dry-run.
- Passed fast static quality gates: python version, lint, format, actionlint, zizmor.

Closes #2238
@dan-petty
dan-petty force-pushed the feat/2238-k8s-cluster-dry-run branch from d1080f2 to ccc9411 Compare October 31, 2026 06:23
@dan-petty
dan-petty marked this pull request as ready for review October 31, 2026 06:37
@dan-petty
dan-petty merged commit b6de1a4 into main Oct 31, 2026
29 of 30 checks passed
@dan-petty
dan-petty deleted the feat/2238-k8s-cluster-dry-run branch October 31, 2026 11:14
dan-petty pushed a commit that referenced this pull request Oct 31, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.26.0](v0.25.0...v0.26.0)
(2026-10-31)


### Features

* **k8s:** preview requests in dry run for cluster commands
([#2839](#2839))
([b6de1a4](b6de1a4)),
closes [#2238](#2238)
* **pr:** preview requests in dry run for pr commands
([#2835](#2835))
([2a9b746](2a9b746)),
closes [#2234](#2234)


### Bug Fixes

* **k8s:** enforce the window of each gateway deployment
([#2843](#2843))
([2ff7d9f](2ff7d9f)),
closes [#2825](#2825)
* **roadmap:** measure a task group by the files its step reads
([#2847](#2847))
([2f3986a](2f3986a)),
closes [#2838](#2838)
* **tests:** replace real test sleeps with clock
([#2169](#2169))
([#2833](#2833))
([506f769](506f769))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/k8s Kubernetes commands, Helm charts, pods, services, and policies type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(k8s): k8s cluster read and access commands list their requests in a dry run and make none

1 participant