diff --git a/seaweed-block/internal/docs/current-plan.md b/seaweed-block/internal/docs/current-plan.md index f4aa2fdcea..e5dd168502 100644 --- a/seaweed-block/internal/docs/current-plan.md +++ b/seaweed-block/internal/docs/current-plan.md @@ -1,6 +1,6 @@ # Current Plan: Phase 40 - Operator Production Hardening -Status: active, 70% complete. Started on 2026-06-13. +Status: active, 78% complete. Started on 2026-06-13. Branch: `phase33-testops-failure-hardening` @@ -199,6 +199,8 @@ QA minimal new-user walkthrough if release digest is available Goal: prove the release candidate from a user and QA perspective. +Status: local gate passed; lab QA pending. + Acceptance: ```text @@ -207,7 +209,7 @@ Acceptance: [ ] operator-status CRDs show healthy volume status and Events [ ] negative status scenario shows no false Ready=True [ ] cleanup leaves zero residue -[ ] conformance harness passes +[x] conformance harness passes [ ] docs and claims match the tested image ``` @@ -282,6 +284,13 @@ release PR or explicit hold note conformance gates, and explicit non-claims for finalizer ownership, automatic cleanup, upgrade execution, repair/rebuild/failback, backup/restore, and NVMe ANA parity. +- 78%: D6 local gate passed. Added `run-phase40-release-candidate-local.ps1` + and the D6 QA assignment. Local checks pass for Go release-scope tests, Helm + lint/template with operator-status write mode, Phase 40 status API + conformance, and `git diff --check`. Release remains held until QA completes + the lab gates for fresh Helm install, first PVC writer/reader, live + operator-status CRD/Event publication, negative status, and zero-residue + cleanup. ## Prerequisites / Risks @@ -295,7 +304,6 @@ release PR or explicit hold note ## Next Step -Start D6 by running the release-candidate gate: focused Go tests, Helm lint and -template, the Phase 40 status API conformance gate, then QA minimal new-user and -negative-status validation against the release image or a clearly identified -local build if the immutable digest is still pending. +Send `internal/docs/qa-assignments/phase40-d6-release-candidate-qa.md` to QA. +Do not cut the release until the required lab gates pass against either the +published release image digest or a clearly identified local build. diff --git a/seaweed-block/internal/docs/qa-assignments/phase40-d6-release-candidate-qa.md b/seaweed-block/internal/docs/qa-assignments/phase40-d6-release-candidate-qa.md new file mode 100644 index 0000000000..9c968c057a --- /dev/null +++ b/seaweed-block/internal/docs/qa-assignments/phase40-d6-release-candidate-qa.md @@ -0,0 +1,230 @@ +# Phase 40 D6 QA: Release Candidate Gate + +## Goal + +Prove the Phase 40 release candidate from both a local build perspective and a +user/lab perspective. + +The release claim is narrow: + +```text +Helm + PVC + read-only/status-only operator status + Events + diagnostics + +delete-safety/install-drift visibility. No lifecycle mutation. +``` + +## Local Gate + +Run from the product repo: + +```powershell +powershell -NoProfile -ExecutionPolicy Bypass -File scripts/run-phase40-release-candidate-local.ps1 +``` + +Required summary: + +```text +phase40_release_candidate_local_status=ok +go_test_release_scope=ok +helm_lint=ok +helm_operator_status_template=ok +status_api_conformance_gate=ok +git_diff_check=ok +``` + +The local gate does **not** prove the Kubernetes user path. It only proves the +release-candidate code, chart render, and CRD/RBAC conformance checks. + +## Required Lab Gates + +Use the release image digest if available. If no digest is published yet, use a +fresh local build and state that clearly in the report. + +### G1 — Minimal New-User Helm Path + +Run the documented CLI values path: + +```text +swblock run testops/scenarios/helm-first-volume-via-sw-block-cli-chain.yaml \ + -env product_root=/path/to/seaweed_block \ + -env sw_block_image= \ + -env sw_block_csi_image= +``` + +Pass criteria: + +- Helm install succeeds. +- First PVC binds. +- Writer verifies data. +- Replacement reader verifies data. +- Report has `index.html`, `summary.txt`, `cluster-evidence.json`, + `timeline.jsonl`, and `operator-snapshot.json`. +- Cleanup summary is `cleanup_status=ok`. + +### G2 — Operator-Status CRD And Event Path + +Install with operator-status write mode enabled: + +```text +helm install sw-block charts/seaweed-block \ + --namespace kube-system \ + --create-namespace \ + -f values.day1.yaml \ + --set operatorStatus.create=true \ + --set operatorStatus.dryRun=false \ + --wait --timeout 10m +``` + +Create the minimal CR stubs if the chart/user path did not create them: + +```yaml +apiVersion: block.seaweedfs.com/v1alpha1 +kind: SwBlockCluster +metadata: + name: sw-block + namespace: kube-system +spec: {} +--- +apiVersion: block.seaweedfs.com/v1alpha1 +kind: SwBlockVolume +metadata: + name: + namespace: kube-system +spec: {} +``` + +Pass criteria: + +- `SwBlockCluster.status.readyVolumeCount >= 1`. +- At least one `SwBlockVolume.status.status=ready`. +- Ready condition has `reasonCode=first_volume_verified`. +- Kubernetes Events exist for the ready volume. +- `kubectl auth can-i` confirms status/events only: + - `patch swblockvolumes --subresource=status`: yes + - `create events`: yes + - `patch swblockvolumes`: no + - `patch pods`: no + - `patch pvc`: no + - `update storageclasses`: no + +### G3 — Negative Status + +Run a blocked-path validation. Preferred path: + +```text +swblock run testops/scenarios/helm-support-bundle-diagnostics-chain.yaml \ + -env product_root=/path/to/seaweed_block \ + -env sw_block_image= \ + -env sw_block_csi_image= +``` + +Pass criteria: + +- Blocked evidence shows `reason=csi_node_image_pull_failed` or another stable + blocked reason intentionally induced by the scenario. +- No CRD/report/dashboard/operator-snapshot surface shows false `Ready=True`. +- Suggested actions are `read_only`, `dry_run`, or `scripted` with + `mutationAllowed=false`. + +### G4 — Status API Conformance TestOps Gate + +Run: + +```text +swblock run testops/scenarios/operator-status-api-conformance-chain.yaml \ + -env product_root=/path/to/seaweed_block +``` + +Pass criteria: + +```text +phase40_status_api_conformance_status=ok +casing_drift_gate=ok +enum_drift_gate=ok +wrong_endpoint_gate=ok +rbac_boundary_gate=ok +delete_safety_status_gate=ok +finalizer_mutation_allowed=false +``` + +### G5 — Final Cleanup + +Run: + +```text +swblock run testops/scenarios/cleanup-residue-chain.yaml \ + -env product_root=/path/to/seaweed_block +``` + +Pass criteria: + +- no Helm release, +- no Seaweed Block pods/deployments/CRDs left unless intentionally kept for + follow-up inspection, +- no iSCSI sessions, +- no Seaweed Block iSCSI node DB records, +- no multipath/dmsetup residue, +- no product processes, +- no test hostPath residue. + +## Optional Extended Gates + +Run only if lab time is available: + +- RF=3 multi-volume smoke, +- restart persistence, +- WAL corruption no-false-ready gate, +- loopback cross-node negative gate. + +## Blocking Criteria + +Block D6 if any of these happen: + +- first-volume writer/reader fails, +- operator-status cannot publish CRD status, +- operator-status gains any storage/workload/spec/finalizer mutation power, +- blocked/stale/corrupt evidence becomes false `Ready=True`, +- cleanup leaves residue, +- docs/release note claim a capability not covered by the tested image. + +## Close Report Template + +```text +Phase 40 D6 Release Candidate QA — PASS/FAIL + +Source commit: +Image(s): +Runner: + +Local gate: +- run/artifact: +- result: + +G1 first-volume: +- run: +- result: + +G2 operator-status CRD/Event: +- evidence: +- result: + +G3 negative status: +- run: +- result: + +G4 status API conformance: +- run: +- result: + +G5 cleanup: +- run: +- result: + +Blocking findings: +- ... + +Non-blocking findings: +- ... + +Release recommendation: +- release / hold +``` diff --git a/seaweed-block/scripts/run-phase40-release-candidate-local.ps1 b/seaweed-block/scripts/run-phase40-release-candidate-local.ps1 new file mode 100644 index 0000000000..bf4f66f301 --- /dev/null +++ b/seaweed-block/scripts/run-phase40-release-candidate-local.ps1 @@ -0,0 +1,107 @@ +param( + [string]$ProductRoot = (Get-Location).Path, + [string]$ArtifactDir = "" +) + +$ErrorActionPreference = "Stop" + +if ([string]::IsNullOrWhiteSpace($ArtifactDir)) { + $stamp = (Get-Date).ToUniversalTime().ToString("yyyyMMddTHHmmssZ") + $ArtifactDir = Join-Path $ProductRoot "results\phase40-release-candidate-local-$stamp" +} + +New-Item -ItemType Directory -Force -Path $ArtifactDir | Out-Null + +$summary = Join-Path $ArtifactDir "phase40-release-candidate-local-summary.txt" +$result = Join-Path $ArtifactDir "result.json" +$log = Join-Path $ArtifactDir "gate.log" +Set-Content -Path $summary -Value "phase40_release_candidate_local_status=running" +Set-Content -Path $log -Value "" + +$status = "ok" + +function Invoke-GateStep { + param( + [string]$Name, + [string]$FilePath, + [string[]]$Arguments + ) + $stdout = Join-Path $ArtifactDir "$Name.stdout.txt" + $stderr = Join-Path $ArtifactDir "$Name.stderr.txt" + Add-Content -Path $log -Value ("[{0}] {1}" -f (Get-Date).ToUniversalTime().ToString("HH:mm:ss"), $Name) + $process = Start-Process -FilePath $FilePath -ArgumentList $Arguments -WorkingDirectory $ProductRoot -NoNewWindow -Wait -PassThru -RedirectStandardOutput $stdout -RedirectStandardError $stderr + if ($process.ExitCode -eq 0) { + Add-Content -Path $summary -Value "$Name=ok" + } else { + Add-Content -Path $summary -Value "$Name=failed" + $script:status = "failed" + } +} + +Invoke-GateStep ` + -Name "go_test_release_scope" ` + -FilePath "go" ` + -Arguments @("test", "./core/ops", "./cmd/sw-block", "./cmd/blockcsi", "./scripts") + +Invoke-GateStep ` + -Name "helm_lint" ` + -FilePath "helm" ` + -Arguments @("lint", "charts/seaweed-block") + +Invoke-GateStep ` + -Name "helm_operator_status_template" ` + -FilePath "helm" ` + -Arguments @( + "template", + "sw-block", + "charts/seaweed-block", + "--namespace", + "kube-system", + "--include-crds", + "--set", + "operatorStatus.create=true", + "--set", + "operatorStatus.dryRun=false" + ) + +$conformanceDir = Join-Path $ArtifactDir "status-api-conformance" +Invoke-GateStep ` + -Name "status_api_conformance_gate" ` + -FilePath "powershell" ` + -Arguments @( + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-File", + (Join-Path $ProductRoot "scripts\run-phase40-status-api-conformance.ps1"), + "-ProductRoot", + $ProductRoot, + "-ArtifactDir", + $conformanceDir + ) + +Invoke-GateStep ` + -Name "git_diff_check" ` + -FilePath "git" ` + -Arguments @("diff", "--check") + +Add-Content -Path $summary -Value "phase40_release_candidate_local_status=$status" +Add-Content -Path $summary -Value "fresh_helm_install_lab_required=true" +Add-Content -Path $summary -Value "first_pvc_writer_reader_lab_required=true" +Add-Content -Path $summary -Value "operator_status_crd_live_lab_required=true" +Add-Content -Path $summary -Value "negative_status_live_lab_required=true" +Add-Content -Path $summary -Value "cleanup_zero_residue_lab_required=true" +Add-Content -Path $summary -Value "status_api_conformance_artifact=$conformanceDir" + +[ordered]@{ + schema_version = "1.0" + scenario = "phase40-release-candidate-local" + status = $status + summary = "Phase 40 local release-candidate gate $status" + artifact_dir = $ArtifactDir + lab_qa_required = $true +} | ConvertTo-Json -Depth 4 | Set-Content -Path $result + +if ($status -ne "ok") { + exit 1 +}