From 60994a67608f81e839aa8df7d4180c83c9626819 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Fri, 24 Jul 2026 21:06:15 -0500 Subject: [PATCH 1/4] test(oci): use errors.Is for io.EOF in push_test Replaces a direct err == io.EOF comparison with stderrors.Is(err, io.EOF) so the test follows the project errorlint rules and handles wrapped EOF correctly. Signed-off-by: Andrew White --- pkg/oci/push_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/oci/push_test.go b/pkg/oci/push_test.go index 9454a0735..857dd6b6a 100644 --- a/pkg/oci/push_test.go +++ b/pkg/oci/push_test.go @@ -106,7 +106,7 @@ func extractFilesFromOCIArtifact(t *testing.T, ociLayoutDir, digest string) map[ tr := tar.NewReader(gzr) for { header, err := tr.Next() - if err == io.EOF { + if stderrors.Is(err, io.EOF) { break } if err != nil { From 55a37e9e81a98b5f9c881101d9dee72f834d68ee Mon Sep 17 00:00:00 2001 From: Andrew White Date: Fri, 24 Jul 2026 21:06:22 -0500 Subject: [PATCH 2/4] chore(tools/coverage): centralize em dash placeholder as constant Introduces emDash in model.go and replaces repeated literal em dash strings in build.go and render.go to satisfy the goconst linter. Signed-off-by: Andrew White --- tools/coverage/build.go | 6 +++--- tools/coverage/model.go | 2 ++ tools/coverage/render.go | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/coverage/build.go b/tools/coverage/build.go index b29f5ecf5..098d26165 100644 --- a/tools/coverage/build.go +++ b/tools/coverage/build.go @@ -171,14 +171,14 @@ func newRow(kind Kind, item string, harnesses map[Harness]bool, unwiredUAT bool) func hardwareCadence(h map[Harness]bool, status Status) (hardware, cadence string) { switch { case status == StatusStubbed: - return "GPU (unwired)", "—" + return "GPU (unwired)", emDash case h[HarnessUAT] || h[HarnessGPUNightly]: return "GPU (H100, real)", "nightly" case h[HarnessChainsaw] || h[HarnessKWOK]: return "simulated / none", "per-PR" case h[HarnessDemo]: - return "docs", "—" + return "docs", emDash default: - return "—", "—" + return emDash, emDash } } diff --git a/tools/coverage/model.go b/tools/coverage/model.go index 20c346220..96f896e30 100644 --- a/tools/coverage/model.go +++ b/tools/coverage/model.go @@ -30,6 +30,8 @@ const ( // only the Azure UAT trees). Distinct from not-yet-covered: the assets are // present but inert pending a revive-or-retire decision (DC6, #1280). StatusStubbed Status = "stubbed" + + emDash = "—" ) // Harness identifies an execution mechanism that can exercise an item. The set diff --git a/tools/coverage/render.go b/tools/coverage/render.go index 7283bf059..2761950e5 100644 --- a/tools/coverage/render.go +++ b/tools/coverage/render.go @@ -94,7 +94,7 @@ func renderTable(heading string, m Matrix, kind Kind) string { } note := r.Note if note == "" { - note = "—" + note = emDash } fmt.Fprintf(&b, "| `%s` | %s | %s | %s | %s | %s |\n", r.Item, exercisedBy(r.Harnesses), r.Hardware, r.Cadence, r.Status, note) @@ -112,7 +112,7 @@ func exercisedBy(h map[Harness]bool) string { } } if len(parts) == 0 { - return "—" + return emDash } return strings.Join(parts, ", ") } From ab5dd91ac467110e287911b7ce5c8f9db1919f61 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Fri, 24 Jul 2026 21:06:22 -0500 Subject: [PATCH 3/4] fix(validators/conformance): constify ExactCount allocation mode Adds allocationModeExactCount and uses it for both v1beta1 and newer ResourceClaim request shapes, resolving a goconst warning. Signed-off-by: Andrew White --- validators/conformance/secure_access_check.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/validators/conformance/secure_access_check.go b/validators/conformance/secure_access_check.go index ab0c78d83..7b58b032d 100644 --- a/validators/conformance/secure_access_check.go +++ b/validators/conformance/secure_access_check.go @@ -65,7 +65,8 @@ const ( gpuClaimPrefix = "gpu-claim-" // noAllocProbePrefix names the standalone probe pod that is granted no // GPU at all (no ResourceClaims, no nvidia.com/gpu limits). - noAllocProbePrefix = "no-alloc-probe-" + noAllocProbePrefix = "no-alloc-probe-" + allocationModeExactCount = "ExactCount" // cudaTestImage runs the in-container GPU visibility verification. cudaTestImage = "nvidia/cuda:12.9.0-base-ubuntu24.04" @@ -1587,12 +1588,12 @@ func buildResourceClaim(run *gpuTestRun, version string) *unstructured.Unstructu } if version == versionV1beta1 { request["deviceClassName"] = draDriverGPU - request["allocationMode"] = "ExactCount" + request["allocationMode"] = allocationModeExactCount request["count"] = int64(1) } else { request["exactly"] = map[string]interface{}{ "deviceClassName": draDriverGPU, - "allocationMode": "ExactCount", + "allocationMode": allocationModeExactCount, "count": int64(1), } } From 5204c9cb1257d6ddcf41cec4087d27d9ac5a83a2 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Fri, 24 Jul 2026 21:06:22 -0500 Subject: [PATCH 4/4] fix(validators/performance): constify NCCL few-node skip message Adds skipMsgNCCLFewNodes and uses it in the constraint and its tests to eliminate the goconst duplication. Signed-off-by: Andrew White --- validators/performance/nccl_all_reduce_bw_constraint.go | 6 ++++-- validators/performance/nccl_benchmark_profile_test.go | 2 +- validators/performance/nccl_benchmark_runtime_test.go | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/validators/performance/nccl_all_reduce_bw_constraint.go b/validators/performance/nccl_all_reduce_bw_constraint.go index 11013fdc9..660d9fe03 100644 --- a/validators/performance/nccl_all_reduce_bw_constraint.go +++ b/validators/performance/nccl_all_reduce_bw_constraint.go @@ -62,6 +62,8 @@ const ( // ncclTrainingRuntimeName is the name of the TrainingRuntime resource. // Must stay in sync with runtime.yaml. ncclTrainingRuntimeName = "nccl-all-reduce-runtime" + + skipMsgNCCLFewNodes = "skipped - requires at least 2 GPU nodes for EW fabric test" ) // Package-level GVR definitions for Kubeflow Trainer CRDs used by both @@ -371,9 +373,9 @@ func validateNcclAllReduceBw(ctx *validators.Context, constraint recipe.Constrai // NCCL all-reduce tests EW (East-West) fabric between nodes and requires at least // two GPU nodes. Skip gracefully rather than fail when only one node is available. if gpuConfig.WorkerCount < 2 { - slog.Info("Skipping NCCL All Reduce bandwidth validation: requires at least 2 GPU nodes for EW fabric test", + slog.Info("Skipping NCCL All Reduce bandwidth validation: "+skipMsgNCCLFewNodes, "nodes", gpuConfig.WorkerCount) - return "skipped - requires at least 2 GPU nodes for EW fabric test", true, nil + return skipMsgNCCLFewNodes, true, nil } // Preflight cluster-side prerequisites before spending TrainJob time. diff --git a/validators/performance/nccl_benchmark_profile_test.go b/validators/performance/nccl_benchmark_profile_test.go index 13f971c16..b0b2321a8 100644 --- a/validators/performance/nccl_benchmark_profile_test.go +++ b/validators/performance/nccl_benchmark_profile_test.go @@ -373,7 +373,7 @@ func TestValidateNcclAllReduceBwProfileClusterPath(t *testing.T) { if err != nil { t.Fatalf("unexpected error: %v", err) } - want := "skipped - requires at least 2 GPU nodes for EW fabric test" + want := skipMsgNCCLFewNodes if !passed || msg != want { t.Errorf("got (%q, %v), want (%q, true)", msg, passed, want) } diff --git a/validators/performance/nccl_benchmark_runtime_test.go b/validators/performance/nccl_benchmark_runtime_test.go index 5d8dedce9..490d9053e 100644 --- a/validators/performance/nccl_benchmark_runtime_test.go +++ b/validators/performance/nccl_benchmark_runtime_test.go @@ -321,7 +321,7 @@ spec: if err != nil { t.Fatalf("unexpected error: %v", err) } - want := "skipped - requires at least 2 GPU nodes for EW fabric test" + want := skipMsgNCCLFewNodes if !passed || msg != want { t.Errorf("got (%q, %v), want (%q, true) — sizing must narrow by the runtime's own nodeSelector", msg, passed, want) } @@ -356,7 +356,7 @@ func TestValidateNcclAllReduceBwCustomRuntimeClusterPath(t *testing.T) { if err != nil { t.Fatalf("unexpected error: %v", err) } - want := "skipped - requires at least 2 GPU nodes for EW fabric test" + want := skipMsgNCCLFewNodes if !passed || msg != want { t.Errorf("got (%q, %v), want (%q, true)", msg, passed, want) }