Repository navigation
fix(k8s): show deployment help without cluster access - #198914
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesMoves Kubernetes deployment preflight checks after help handling so both help flags work offline. Example: Run
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains This PR fixes a current-main help failure with a focused change and no introduced defects found; CI awaits workflow approval. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherThe Kubernetes deployment script accepts operator flags and environment settings, prints local help, or validates tooling and cluster connectivity before managing OpenClaw resources. flowchart TD
A[Operator invocation] --> B[Deployment script]
B --> C[Help handling]
C --> D[Usage and successful exit]
B --> E[Tool and cluster preflight]
E --> F[Deployment or teardown]
Technical reviewBest possible solution: Keep the existing help branch before deployment preflight and retain all operational checks. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically exits during preflight before help when tools or cluster connectivity are absent; contributor terminal output confirms both cases, and this read-only review executed no target code. Is this the best way to solve the issue? This is the smallest complete fix: preserve the invariant that help requires no deployment access by moving the unchanged preflight below its existing early exit, using the existing script and test owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e741fd0d21ff. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +22, Other 0. Total +22 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 14, 2026, 10:03 AM ET / 15:03 UTC (Revision 2). |
|
@clawsweeper re-review Added the requested terminal capture to the PR body: the complete deployment script shows usage for both flags with deployment tools absent and with a failing cluster probe. Captured exit codes, tool-call counts and unchanged deletion preflight controls are included. No code change. |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
Allow Kubernetes deployment help to print before deployment tools or cluster access are available, while preserving preflight checks for all operational modes. Validated the exact script in 18 isolated base/head scenarios, including both help flags, absent tools, unreachable-cluster controls, and all three teardown modes. CI exception: check-test-types in run 43605802000, attempt 2, fails on TS18048 in scripts/perf/state-read-worker-bench.ts:373. The tested baseline and merge have identical benchmark inputs; main already contains the repair from openclaw#198912. No passing CI conclusion is claimed for that failed attempt. Security and review gates remain required. Closes openclaw#198913. Co-authored-by: Leonardo Bohac <[email protected]> Co-authored-by: sallyom <[email protected]>
Closes #198913
What Problem This Solves
Fixes Kubernetes deployment help failing before it prints usage when deployment tools or cluster access are unavailable.
User Impact
Operators can read
--helpand-hbefore installing tools, configuring kubeconfig, or restoring cluster connectivity.Why This Change Was Made
The existing help branch now runs before the deployment preflight. Operational modes still require the same tools and a reachable cluster.
Evidence
test/scripts/k8s-deploy.test.tspass, including the existing teardown cases and an unreachable-cluster deletion control.--deletestill exits 1 in both environments. Kubernetes calls were inert stubs; no live cluster was used./bin/bash -n scripts/k8s/deploy.shpass.Validated on macOS 27.0.1, system Bash 3.2.57 and Node 26.12.1. The six-test wrapper completed in 2.30 seconds.
Validation commands
node scripts/test-projects.mts test/scripts/k8s-deploy.test.ts node scripts/run-oxlint.mjs --tsconfig test/tsconfig/tsconfig.test.root.json test/scripts/k8s-deploy.test.ts node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.root.scripts.json --incremental pnpm exec oxfmt --check test/scripts/k8s-deploy.test.ts /bin/bash -n scripts/k8s/deploy.shFull-script terminal capture
The following output comes from
/bin/bash scripts/k8s/deploy.shitself. For the missing-tools case, the temporary PATH contains onlydirnameandcat;kubectlandopenssldo not exist on that PATH. For the unavailable-cluster case, both are inert executables that record calls and exit 1. Each process receives only that PATH and the temporary call-log path.Actual stdout for both fixed help flags in both environments:
The deletion controls still stop at preflight. No cluster operation is simulated as successful, and no live cluster is accessed. The base/head comparison changes only the deployment script between
b27440329b4cand8869e1987715; the fixture and invocation remain identical.