Repository navigation
test(openshell): explain failed outage redeploys and stuck namespace deletes - #2940
Conversation
… times out Finding 2018: the OpenShell provider-delivery cell passed every step and then went red in teardown because kubectl delete namespace --wait timed out after 120 s, with nothing saying which object held the namespace. deleteNamespaceExplained runs the same delete and, when it fails, adds the namespace's phase, finalizers and status conditions plus every object left in it (kind/name, finalizers, deletion time) to the delete's own error. Each read is bounded by the diagnostic request timeout and the whole listing by the diagnostic deadline. The delete itself, its timeout and the teardown step limit are unchanged.
…ailed Finding 2017: after the OpenShell gateway outage, the redeploy queued during it ended failed_permanent with RUNTIME_LOGIN_FAILED after 4 attempts. The proof printed only the work row and recovery flags, so the login failure's cause was unknown, and by the time the later refresh checks finished the failed revision's Pods could be gone. When the redeploy does not activate, failedRecoveryDiagnostic reads, at once, the worker's events and persisted state (diagnoseRevision) and the existing replacement diagnostic (the revision's Pods and the Gateway, Harness and OpenShell supervisor log tails, redacted and budgeted). Each read is bounded by the diagnostic deadline; a failed or stalled read only says so. The text goes to stderr, to the wait's error when the wait failed, and to the redeployActivated assertion message. Retry behaviour and the assertions are unchanged.
|
🦞👀 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. |
…removes Keeps the open native-authority PR (#1982) free of a new conflict in this file: it deletes the neighbouring OPENSHELL_KUBERNETES_WORKLOAD_IDENTITY import.
…es and print metadata only Review fixes for findings 2017 and 2018: - An unavailable aggregated API makes kubectl api-resources exit 1 while still printing the other kinds (NamespaceDeletionDiscoveryFailure, a common cause of a stuck namespace). The listing now goes on with them and keeps the namespace's phase and conditions. - Objects are listed through a jsonpath template of kind, name, finalizers and deletion time, so a Secret's or ConfigMap's data is never printed, and raw output is never echoed. - The listing has its own 40 s bound, so the 120 s delete plus the listing stay within the 180 s teardown step limit. - A stalled worker read in the recovery diagnostic now gives describe no worker instead of the deadline's default text.
|
Codex review: needs maintainer review before merge. What this changesThis PR adds bounded diagnostics for failed OpenShell outage recovery and namespace deletion in the real-cluster test harness. Example: Deleting namespace oce-held times out because a Sandbox retains openshell.io/sandbox.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it adds useful failure diagnostics without weakening assertions, and no actionable correctness or security defect was found. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe OpenShell integration harness drives OCC and Kubernetes workflows; these failure paths read worker state and cluster metadata and append diagnostic text to existing test failures. flowchart TD
A[OpenShell integration test] --> B[Outage recovery diagnostic]
A --> C[Namespace cleanup diagnostic]
B --> D[Worker state and runtime logs]
C --> E[Kubernetes object metadata]
D --> F[Existing test failure]
E --> F
Technical reviewBest possible solution: Retain the focused diagnostics through the existing test owners while leaving investigation of the underlying runtime and deletion failures separate. Do we have a high-confidence way to reproduce the issue? Current-main source confirms that namespace deletion lacks remaining-object diagnostics and outage recovery lacks the immediate replacement diagnostic; the reported cluster failures were not independently reproduced. Is this the best way to solve the issue? The implementation appropriately reuses existing deadlines, redaction, and replacement diagnostics while preserving failure outcomes and avoiding product changes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7afa66cb5532. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
LabelsLabel 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 Reviewed October 19, 2026, 9:56 AM ET / 13:56 UTC. |
Problem
Two low-severity flakes in the OpenShell provider-delivery proof (QA advisory, OpenShell cell) fail without saying why:
failed_permanentwithRUNTIME_LOGIN_FAILEDafter 4 attempts (main ec746df, run 39246110243; third sighting). The proof printed only the work row and recovery flags. By the time the later refresh checks finished, the failed revision's Pods could be gone.kubectl delete namespace --wait --timeout=120stimed out (Show the next operator where to resume an installation #2905, run 39223713789) and turned the cell red. Nothing said which object held the namespace.Change
Test-only. Both are diagnostics. Retry behaviour, timeouts and assertions are unchanged.
deleteNamespaceExplained(tests/helpers/kubernetes-real.mjs) runs the same delete. When it fails, it appends to the delete's own error:NamespaceDeletionDiscoveryFailure), it carries on with what kubectl printed and names the failure.workloadNamespacecleanup uses it.failedRecoveryDiagnostic(tests/helpers/openshell-kubernetes-real.mjs) reads two things right away, each within the diagnostic deadline:diagnoseRevision);redeployActivatedassertion message.Verification
tests/conformance/kubernetes-real-kubectl.test.mjs: 44/44, with three new stubbed-kubectl and stub-reader tests.describeno worker. A describe that throws gives only the error class. A stalled read gives way to the deadline (50 ms in the test).Risks
Low. Test-only, and runs only on failure paths.
For the owner (2017): the runtime logs only that the Codex login failed, not why, since the stderr could echo a credential. So the Harness section shows the failed login phase and the supervisor's DENIED lines, not the provider's text. If the next sighting shows a transient egress or proxy failure right after the gateway restart, there are two fixes: