Repository navigation
Revert "feat(slinky-slurm): AKS H100 recipe, Enroot/Pyxis, Gres/GPU (#1744)" - #1788
Conversation
…, and Gres/GPU config (NVIDIA#1744)" This reverts commit 7e54fca (PR NVIDIA#1744). PR NVIDIA#1744 was squash-merged from a branch based on stale main. Its diff did not just add the slinky-slurm feature — it also reverted unrelated work that had already landed on main, including the UAT cluster debug-bundle collector (tests/uat/lib/collect-debug.sh, NVIDIA#1764) and deletions across the bundler deployers (argocd/flux/helmfile), config, and docs. Reverting NVIDIA#1744 restores that clobbered work. Signed-off-by: Nathan Hensley <[email protected]>
Recipe evidence checkOther affected recipes without evidence yet: 4These recipes are affected by this PR but carry no committed evidence pointer, so there is
This gate is warning-only and never blocks merge. See ADR-007 for the trust model. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe pull request adds serial deployment support across the bundle API, CLI, configuration, Argo CD, Flux, and Helmfile generators. It introduces shared UAT cluster-debug collection before teardown, updates Slurm health validation and recipes, removes an AKS Slurm recipe, and bumps the Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
validators/conformance/slinky_slurm_health_check.go (1)
189-217: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winSequential node lookups without a context-cancellation check.
This loop issues one
Nodes().Getcall per NodeSet pod sequentially, with noctx.Ctx.Done()check between iterations, and these per-pod lookups are independent work that could fan out viaerrgroup.WithContextinstead. If the context is canceled mid-loop, theGetcall surfacescontext.Canceled, but it's then wrapped asErrCodeInternalrather than being recognized as a cancellation, and unrelated in-flight lookups continue sequentially instead of a fast, parallel exit.As per coding guidelines: "Always check
ctx.Done()in loops and long-running operations in Go code" and "Useerrgroup.WithContextfor concurrent fan-out of independent work instead of sequential calls."♻️ Suggested refactor using errgroup + ctx.Done()
func skipIfAllNodeSetPodsAreKWOK(ctx *validators.Context, namespace string) error { pods, err := listSlinkyNodeSetPods(ctx, namespace) if err != nil { return err } if len(pods) == 0 { return errors.New(errors.ErrCodeNotFound, "slinky-slurm selected but no NodeSet pods were found") } - var resolved, kwok int - for _, pod := range pods { - if pod.Spec.NodeName == "" { - continue - } - node, getErr := ctx.Clientset.CoreV1().Nodes().Get(ctx.Ctx, pod.Spec.NodeName, metav1.GetOptions{}) - if getErr != nil { - return errors.Wrap(errors.ErrCodeInternal, - fmt.Sprintf("failed to get node %s for NodeSet pod %s", pod.Spec.NodeName, pod.Name), getErr) - } - resolved++ - if _, ok := node.Annotations[kwokNodeAnnotation]; ok { - kwok++ - } - } + g, gCtx := errgroup.WithContext(ctx.Ctx) + var mu sync.Mutex + var resolved, kwok int + for _, pod := range pods { + pod := pod + if pod.Spec.NodeName == "" { + continue + } + g.Go(func() error { + select { + case <-gCtx.Done(): + return gCtx.Err() + default: + } + node, getErr := ctx.Clientset.CoreV1().Nodes().Get(gCtx, pod.Spec.NodeName, metav1.GetOptions{}) + if getErr != nil { + return errors.Wrap(errors.ErrCodeInternal, + fmt.Sprintf("failed to get node %s for NodeSet pod %s", pod.Spec.NodeName, pod.Name), getErr) + } + mu.Lock() + resolved++ + if _, ok := node.Annotations[kwokNodeAnnotation]; ok { + kwok++ + } + mu.Unlock() + return nil + }) + } + if err := g.Wait(); err != nil { + return err + } if resolved == len(pods) && kwok == resolved { return validators.Skip("Slinky NodeSet pods are on KWOK nodes; skipping Slurm health validation") } return nil }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@validators/conformance/slinky_slurm_health_check.go` around lines 189 - 217, Refactor skipIfAllNodeSetPodsAreKWOK to perform the independent node lookups through errgroup.WithContext, using the derived context for each Nodes().Get call. Check the context cancellation signal before or during iteration and return cancellation directly rather than wrapping it as ErrCodeInternal; preserve the existing node-resolution and KWOK counting behavior and error messages for non-cancellation failures.Source: Coding guidelines
tests/chainsaw/cli/bundle-flux/chainsaw-test.yaml (1)
143-201: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winValidate the complete dependency lists in the Chainsaw checks.
Both scripts can accept invalid output because they inspect only one dependency per release.
tests/chainsaw/cli/bundle-flux/chainsaw-test.yaml#L143-L201: parse everydependsOnedge and reject branching; a linear chain requires at most one child per predecessor.tests/chainsaw/cli/bundle-helmfile/chainsaw-test.yaml#L151-L164: require exactly one completeneedsentry for every non-root serial release.tests/chainsaw/cli/bundle-helmfile/chainsaw-test.yaml#L242-L297: validate every default-modeneedstarget remains within its component.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/chainsaw/cli/bundle-flux/chainsaw-test.yaml` around lines 143 - 201, Update tests/chainsaw/cli/bundle-flux/chainsaw-test.yaml lines 143-201 to parse every dependsOn entry for each HelmRelease, reject releases with multiple dependencies, and verify the complete edge set forms a single linear chain with no branching, cycles, or orphans. Update tests/chainsaw/cli/bundle-helmfile/chainsaw-test.yaml lines 151-164 to parse the complete needs list and require exactly one target for every non-root serial release. Update tests/chainsaw/cli/bundle-helmfile/chainsaw-test.yaml lines 242-297 to validate every default-mode needs target belongs to the same component rather than checking only one entry.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/integrator/talos-integration.md`:
- Around line 112-116: Update the Argo CD deployer documentation to qualify the
`level*4 + phase` sync-wave formula as the default-mode behavior, and document
that `--serial` instead assigns each folder its linear index. Preserve the
existing dependency-order and namespace-first explanation while clearly
distinguishing the two modes.
In `@pkg/bundler/handler.go`:
- Around line 387-396: Update the serial query handling around
query.Get("serial") to distinguish an absent parameter from an explicitly empty
serial value. Check query-key presence separately, reject present-but-empty
values with the existing invalid-boolean error, and preserve boolean parsing for
non-empty values; add a regression test covering ?serial=.
In `@tests/uat/aws/run`:
- Around line 313-321: Extract the duplicated readiness-gate persistence and
failure skyhook-capture logic from the cloud run scripts into a shared helper,
then update the AWS, GCP, and Azure run flows to call it. Preserve each script’s
existing provider-specific behavior, including Azure az-relogin handling, while
centralizing gate-log initialization, attempt-result tracking/appending, vrc
capture, and capture_skyhook_snapshot.
In `@tests/uat/azure/run`:
- Around line 360-368: Consolidate the readiness-gate persistence and
skyhook-capture logic currently duplicated in the Azure runner with the
equivalent AWS and GCP runner implementation. Extract or reuse a shared helper
for the CLUSTER_DEBUG_GATE_LOG setup, attempt recording, and capture behavior,
then update the affected Azure flow to call it while preserving timestamped
validation output and immediate failure diagnostics.
In `@tests/uat/gcp/run`:
- Around line 313-321: Consolidate the readiness-gate persistence and
skyhook-capture logic currently duplicated in the GCP runner’s setup and
attempt-handling sections, matching the shared implementation used by the AWS
and Azure runners. Update the relevant readiness initialization and the
referenced blocks around the attempt loop and failure handling to reuse the
common helper or shared path, while preserving timestamped validation output and
immediate failure diagnostics.
In `@tests/uat/lib/collect-debug.sh`:
- Around line 143-157: Ensure the collector remains non-failing under set -e by
guarding the _cd_section pipeline with || true or an equivalent explicit
successful return. Apply the same protection to the MANIFEST.yaml generation,
node-reboot-fingerprint tee block, and per-pod log redirect block so write
failures cannot skip later collection sections.
- Around line 244-279: Update the namespace iteration around
CLUSTER_DEBUG_LOG_NAMESPACES to process all allowlisted operator/check
namespaces first, then perform the general namespace sweep for remaining
namespaces. Preserve the existing pods/jobs/events collection for every
namespace and the describe/log collection only for allowlisted namespaces, while
avoiding duplicate processing when a namespace appears in both groups.
---
Outside diff comments:
In `@tests/chainsaw/cli/bundle-flux/chainsaw-test.yaml`:
- Around line 143-201: Update tests/chainsaw/cli/bundle-flux/chainsaw-test.yaml
lines 143-201 to parse every dependsOn entry for each HelmRelease, reject
releases with multiple dependencies, and verify the complete edge set forms a
single linear chain with no branching, cycles, or orphans. Update
tests/chainsaw/cli/bundle-helmfile/chainsaw-test.yaml lines 151-164 to parse the
complete needs list and require exactly one target for every non-root serial
release. Update tests/chainsaw/cli/bundle-helmfile/chainsaw-test.yaml lines
242-297 to validate every default-mode needs target belongs to the same
component rather than checking only one entry.
In `@validators/conformance/slinky_slurm_health_check.go`:
- Around line 189-217: Refactor skipIfAllNodeSetPodsAreKWOK to perform the
independent node lookups through errgroup.WithContext, using the derived context
for each Nodes().Get call. Check the context cancellation signal before or
during iteration and return cancellation directly rather than wrapping it as
ErrCodeInternal; preserve the existing node-resolution and KWOK counting
behavior and error messages for non-cancellation failures.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 4667767a-e13a-4e86-8a99-ed1f5d827a53
📒 Files selected for processing (64)
.github/workflows/uat-aws.yaml.github/workflows/uat-azure.yaml.github/workflows/uat-gcp.yamlapi/aicr/v1/server.yamldemos/cuj1-slinky-slurm.mddocs/contributor/component.mddocs/integrator/components/nodewright.mddocs/integrator/data-flow.mddocs/integrator/recipe-development.mddocs/integrator/talos-integration.mddocs/user/air-gap-mirror.mddocs/user/api-reference.mddocs/user/cli-reference.mddocs/user/component-catalog.mddocs/user/container-images.mddocs/user/recipe-health.mdpkg/bundler/bundler.gopkg/bundler/config/config.gopkg/bundler/config/config_test.gopkg/bundler/deployer/argocd/argocd.gopkg/bundler/deployer/argocd/argocd_test.gopkg/bundler/deployer/argocd/testdata/helm_and_kustomize/001-cert-manager/application.yamlpkg/bundler/deployer/argocd/testdata/helm_and_manifest_only/001-cert-manager/application.yamlpkg/bundler/deployer/argocd/testdata/kustomize_only/001-my-kustomize-app/application.yamlpkg/bundler/deployer/argocd/testdata/mixed_component/001-gpu-operator/application.yamlpkg/bundler/deployer/argocd/testdata/mixed_component/002-gpu-operator-post/application.yamlpkg/bundler/deployer/argocd/testdata/readiness_gate/001-gpu-operator/application.yamlpkg/bundler/deployer/argocd/testdata/readiness_gate/002-gpu-operator-readiness/application.yamlpkg/bundler/deployer/argocdhelm/argocdhelm.gopkg/bundler/deployer/argocdhelm/testdata/helm_and_manifest_only/templates/cert-manager.yamlpkg/bundler/deployer/argocdhelm/testdata/mixed_component/templates/gpu-operator-post.yamlpkg/bundler/deployer/argocdhelm/testdata/mixed_component/templates/gpu-operator.yamlpkg/bundler/deployer/argocdhelm/testdata/readiness_gate/templates/gpu-operator-readiness.yamlpkg/bundler/deployer/argocdhelm/testdata/readiness_gate/templates/gpu-operator.yamlpkg/bundler/deployer/flux/flux.gopkg/bundler/deployer/flux/flux_test.gopkg/bundler/deployer/helmfile/crd_split_test.gopkg/bundler/deployer/helmfile/helmfile.gopkg/bundler/deployer/helmfile/helmfile_test.gopkg/bundler/deployer/helmfile/releases.gopkg/bundler/handler.gopkg/bundler/handler_test.gopkg/cli/bundle.gopkg/recipe/deployment_order_guard_test.gopkg/recipe/metadata_store_test.gopkg/recipe/metadata_test.gorecipes/components/nodewright-customizations/manifests/tuning-generic.yamlrecipes/components/nodewright-customizations/manifests/tuning.yamlrecipes/components/slinky-slurm/values.yamlrecipes/overlays/gb200-eks-ubuntu-training-slurm.yamlrecipes/overlays/h100-aks-ubuntu-training-slurm.yamlrecipes/overlays/h100-eks-ubuntu-training-slurm.yamlrecipes/overlays/h100-gke-cos-training-slurm.yamlrecipes/validators/README.mdrecipes/validators/catalog.yamltests/chainsaw/cli/bundle-flux/chainsaw-test.yamltests/chainsaw/cli/bundle-helmfile/chainsaw-test.yamltests/uat/aws/runtests/uat/azure/runtests/uat/gcp/runtests/uat/lib/collect-debug.shvalidators/conformance/slinky_slurm_health_check.govalidators/conformance/slinky_slurm_health_check_test.govalidators/conformance/slinky_slurm_imex_channel_check.go
💤 Files with no reviewable changes (7)
- recipes/overlays/h100-aks-ubuntu-training-slurm.yaml
- docs/user/air-gap-mirror.md
- pkg/recipe/deployment_order_guard_test.go
- pkg/recipe/metadata_test.go
- recipes/components/slinky-slurm/values.yaml
- demos/cuj1-slinky-slurm.md
- pkg/recipe/metadata_store_test.go
| - **Argo CD deployer:** each folder becomes an Application with an | ||
| `argocd.argoproj.io/sync-wave` annotation. Waves are assigned by | ||
| dependency depth (`level*4 + phase`), and the `-pre` phase sorts | ||
| before the primary within the component's band, so Argo applies the | ||
| namespace first. No operator action needed. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Qualify the sync-wave formula as default-mode behavior.
Line 113 states that Argo CD always uses level*4 + phase, but --serial assigns each folder its linear index instead. Document both modes so serial users do not rely on the wrong wave values.
Proposed wording
-- **Argo CD deployer:** each folder becomes an Application with an
- `argocd.argoproj.io/sync-wave` annotation. Waves are assigned by
- dependency depth (`level*4 + phase`), and the `-pre` phase sorts
- before the primary within the component's band, so Argo applies the
- namespace first. No operator action needed.
+- **Argo CD deployer:** each folder becomes an Application with an
+ `argocd.argoproj.io/sync-wave` annotation. By default, waves are
+ assigned by dependency depth (`level*4 + phase`); with `--serial`,
+ folders use a linear sequence instead. In both modes, `-pre` sorts
+ before the primary, so Argo applies the namespace first.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - **Argo CD deployer:** each folder becomes an Application with an | |
| `argocd.argoproj.io/sync-wave` annotation. Waves are assigned by | |
| dependency depth (`level*4 + phase`), and the `-pre` phase sorts | |
| before the primary within the component's band, so Argo applies the | |
| namespace first. No operator action needed. | |
| - **Argo CD deployer:** each folder becomes an Application with an | |
| `argocd.argoproj.io/sync-wave` annotation. By default, waves are | |
| assigned by dependency depth (`level*4 + phase`); with `--serial`, | |
| folders use a linear sequence instead. In both modes, `-pre` sorts | |
| before the primary, so Argo applies the namespace first. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/integrator/talos-integration.md` around lines 112 - 116, Update the Argo
CD deployer documentation to qualify the `level*4 + phase` sync-wave formula as
the default-mode behavior, and document that `--serial` instead assigns each
folder its linear index. Preserve the existing dependency-order and
namespace-first explanation while clearly distinguishing the two modes.
| // Parse serial (deploy components one at a time instead of parallelizing | ||
| // independent ones; the API counterpart of the --serial CLI flag). | ||
| if v := query.Get("serial"); v != "" { | ||
| b, parseErr := strconv.ParseBool(v) | ||
| if parseErr != nil { | ||
| return nil, aicrerrors.Wrap(aicrerrors.ErrCodeInvalidRequest, | ||
| "serial must be a boolean (true/false)", parseErr) | ||
| } | ||
| params.serial = b | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Reject explicitly empty serial values.
query.Get("serial") returns an empty string both when the parameter is absent and when the request contains ?serial=, so the latter is silently accepted as false instead of rejected as an invalid boolean. Check key presence separately before parsing, and add a serial= regression case.
Proposed fix
- if v := query.Get("serial"); v != "" {
+ if _, present := query["serial"]; present {
+ v := query.Get("serial")
b, parseErr := strconv.ParseBool(v)
if parseErr != nil {
return nil, aicrerrors.Wrap(aicrerrors.ErrCodeInvalidRequest,
"serial must be a boolean (true/false)", parseErr)
}
params.serial = b
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Parse serial (deploy components one at a time instead of parallelizing | |
| // independent ones; the API counterpart of the --serial CLI flag). | |
| if v := query.Get("serial"); v != "" { | |
| b, parseErr := strconv.ParseBool(v) | |
| if parseErr != nil { | |
| return nil, aicrerrors.Wrap(aicrerrors.ErrCodeInvalidRequest, | |
| "serial must be a boolean (true/false)", parseErr) | |
| } | |
| params.serial = b | |
| } | |
| // Parse serial (deploy components one at a time instead of parallelizing | |
| // independent ones; the API counterpart of the --serial CLI flag). | |
| if _, present := query["serial"]; present { | |
| v := query.Get("serial") | |
| b, parseErr := strconv.ParseBool(v) | |
| if parseErr != nil { | |
| return nil, aicrerrors.Wrap(aicrerrors.ErrCodeInvalidRequest, | |
| "serial must be a boolean (true/false)", parseErr) | |
| } | |
| params.serial = b | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pkg/bundler/handler.go` around lines 387 - 396, Update the serial query
handling around query.Get("serial") to distinguish an absent parameter from an
explicitly empty serial value. Check query-key presence separately, reject
present-but-empty values with the existing invalid-boolean error, and preserve
boolean parsing for non-empty values; add a regression test covering ?serial=.
| # Persist each attempt's validate output (timestamped) to the bundle so the | ||
| # status.status progression across the tuning-settling window survives into the | ||
| # failure artifact — capturing the complete→in_progress flips as they happen | ||
| # (see CLUSTER_DEBUG_GATE_LOG in tests/uat/lib/collect-debug.sh). The mktemp | ||
| # gate_log is still used for the immediate on-screen failure diagnostic. | ||
| mkdir -p "${CLUSTER_DEBUG_DIR}" | ||
| : > "${CLUSTER_DEBUG_GATE_LOG}" || true | ||
| local ready_deadline=$(( SECONDS + READINESS_TIMEOUT_SECONDS )) | ||
| local attempt=1 streak=0 ready=false remaining | ||
| local attempt=1 streak=0 ready=false remaining attempt_result |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Readiness-gate persistence + skyhook-capture-on-failure logic duplicated verbatim across all three cloud run scripts.
This block (gate-log init + attempt-result tracking + append) and the vrc-capture/capture_skyhook_snapshot block are essentially identical to the same ranges in tests/uat/gcp/run and structurally the same (plus az-relogin) in tests/uat/azure/run. See consolidated comment for the cross-file recommendation.
Also applies to: 337-360, 395-409
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/uat/aws/run` around lines 313 - 321, Extract the duplicated
readiness-gate persistence and failure skyhook-capture logic from the cloud run
scripts into a shared helper, then update the AWS, GCP, and Azure run flows to
call it. Preserve each script’s existing provider-specific behavior, including
Azure az-relogin handling, while centralizing gate-log initialization,
attempt-result tracking/appending, vrc capture, and capture_skyhook_snapshot.
| # Persist each attempt's validate output (timestamped) to the bundle so the | ||
| # status.status progression across the tuning-settling window survives into the | ||
| # failure artifact — capturing the complete→in_progress flips as they happen | ||
| # (see CLUSTER_DEBUG_GATE_LOG in tests/uat/lib/collect-debug.sh). The mktemp | ||
| # gate_log is still used for the immediate on-screen failure diagnostic. | ||
| mkdir -p "${CLUSTER_DEBUG_DIR}" | ||
| : > "${CLUSTER_DEBUG_GATE_LOG}" || true | ||
| local ready_deadline=$(( SECONDS + READINESS_TIMEOUT_SECONDS )) | ||
| local attempt=1 streak=0 ready=false remaining | ||
| local attempt=1 streak=0 ready=false remaining attempt_result |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Same readiness-gate persistence + skyhook-capture logic duplicated here as in tests/uat/aws/run and tests/uat/gcp/run.
See consolidated comment for the cross-file recommendation.
Also applies to: 398-421, 456-470
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/uat/azure/run` around lines 360 - 368, Consolidate the readiness-gate
persistence and skyhook-capture logic currently duplicated in the Azure runner
with the equivalent AWS and GCP runner implementation. Extract or reuse a shared
helper for the CLUSTER_DEBUG_GATE_LOG setup, attempt recording, and capture
behavior, then update the affected Azure flow to call it while preserving
timestamped validation output and immediate failure diagnostics.
| # Persist each attempt's validate output (timestamped) to the bundle so the | ||
| # status.status progression across the tuning-settling window survives into the | ||
| # failure artifact — capturing the complete→in_progress flips as they happen | ||
| # (see CLUSTER_DEBUG_GATE_LOG in tests/uat/lib/collect-debug.sh). The mktemp | ||
| # gate_log is still used for the immediate on-screen failure diagnostic. | ||
| mkdir -p "${CLUSTER_DEBUG_DIR}" | ||
| : > "${CLUSTER_DEBUG_GATE_LOG}" || true | ||
| local ready_deadline=$(( SECONDS + READINESS_TIMEOUT_SECONDS )) | ||
| local attempt=1 streak=0 ready=false remaining | ||
| local attempt=1 streak=0 ready=false remaining attempt_result |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Same readiness-gate persistence + skyhook-capture logic duplicated here as in tests/uat/aws/run and tests/uat/azure/run.
See consolidated comment for the cross-file recommendation.
Also applies to: 337-360, 395-409
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/uat/gcp/run` around lines 313 - 321, Consolidate the readiness-gate
persistence and skyhook-capture logic currently duplicated in the GCP runner’s
setup and attempt-handling sections, matching the shared implementation used by
the AWS and Azure runners. Update the relevant readiness initialization and the
referenced blocks around the attempt loop and failure handling to reuse the
common helper or shared path, while preserving timestamped validation output and
immediate failure diagnostics.
| # _cd_section runs a labeled command group, teeing to both the step log (folded | ||
| # in an Actions ::group::) and a file in the bundle. The command is bounded by | ||
| # CLUSTER_DEBUG_CMD_TIMEOUT (via _cd_bounded), so a single hung call can't starve | ||
| # later sections. Callers must pass an EXTERNAL command (kubectl / bash -c), never | ||
| # a bare shell function — `timeout` cannot invoke a function; route function-based | ||
| # sections directly (see the node-reboot-fingerprint section). Never fails. | ||
| _cd_section() { | ||
| local label="$1" outfile="$2"; shift 2 | ||
| { | ||
| echo "##### ${label} #####" | ||
| echo "\$ $*" | ||
| _cd_bounded "$@" 2>&1 || true | ||
| echo | ||
| } | tee -a "${CLUSTER_DEBUG_DIR}/${outfile}" | ||
| } |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
_cd_section (and the 3 raw tee/>> blocks) can abort the whole collector under set -e.
_cd_section's body ends on } | tee -a "${file}" with no trailing || true/explicit return 0, so its exit status is whatever tee returns. Every call site (nodes/events/pods/CR/namespace sections) is invoked bare, with no || true. The MANIFEST.yaml generation (167-195), the node-reboot-fingerprint block (216-220), and the per-pod log block (268-277) have the same gap — their pipe/redirect exit status is unguarded. Under the caller scripts' set -e (confirmed by tests/uat/azure/run's own comment referencing "a set -e (L41) abort"), a single failed write (disk full, permission, unmounted workspace) aborts collect_cluster_debug immediately, skipping every later section — contradicting the documented invariant that "the whole collector is wrapped so it never fails the run" (lines 32-36). The outer workflow step still "succeeds" (run: ... debug ... || true), so this silently truncates the bundle rather than failing the job — but it defeats the tool's purpose exactly when the cluster is degraded enough to make writes flaky.
🛡️ Proposed fix: guarantee success at the function/block boundary
_cd_section() {
local label="$1" outfile="$2"; shift 2
{
echo "##### ${label} #####"
echo "\$ $*"
_cd_bounded "$@" 2>&1 || true
echo
- } | tee -a "${CLUSTER_DEBUG_DIR}/${outfile}"
+ } | tee -a "${CLUSTER_DEBUG_DIR}/${outfile}" || true
}Apply the same || true to the MANIFEST.yaml tee (line 195), the node-reboot-fingerprint tee -a (line 220), and the per-pod-log >> redirect block (line 277).
Also applies to: 167-195, 216-220, 268-277
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/uat/lib/collect-debug.sh` around lines 143 - 157, Ensure the collector
remains non-failing under set -e by guarding the _cd_section pipeline with ||
true or an equivalent explicit successful return. Apply the same protection to
the MANIFEST.yaml generation, node-reboot-fingerprint tee block, and per-pod log
redirect block so write failures cannot skip later collection sections.
| local ns | ||
| for ns in $(_cd_bounded kubectl get ns -o name 2>/dev/null | sed 's|namespace/||'); do | ||
| local nsfile="ns-${ns}.txt" | ||
| _cd_section "[${ns}] pods (wide)" "${nsfile}" \ | ||
| kubectl get pods -n "${ns}" -o wide | ||
| _cd_section "[${ns}] jobs" "${nsfile}" \ | ||
| kubectl get jobs -n "${ns}" -o wide | ||
| _cd_section "[${ns}] events (by time)" "${nsfile}" \ | ||
| kubectl get events -n "${ns}" --sort-by=.lastTimestamp | ||
|
|
||
| # `describe pods` and full logs are limited to the operator/check namespaces | ||
| # in the allowlist. `describe` renders literal (non-Secret) env values in its | ||
| # Environment section; scoping it to trusted operator namespaces — rather than | ||
| # every namespace — bounds credential/PII exposure in the public-repo artifact | ||
| # (a UAT recipe override or third-party chart with a literal-env secret would | ||
| # otherwise leak straight in). The get/events above still cover every namespace. | ||
| case " ${CLUSTER_DEBUG_LOG_NAMESPACES} " in | ||
| *" ${ns} "*) ;; | ||
| *) continue ;; | ||
| esac | ||
| _cd_section "[${ns}] describe pods" "${nsfile}" \ | ||
| kubectl describe pods -n "${ns}" | ||
| local logfile="logs-${ns}.txt" p | ||
| for p in $(_cd_bounded kubectl get pods -n "${ns}" -o name 2>/dev/null); do | ||
| { | ||
| echo "===== ${ns}/${p} (current) =====" | ||
| _cd_bounded kubectl logs -n "${ns}" "${p#pod/}" --all-containers \ | ||
| --tail="${CLUSTER_DEBUG_LOG_TAIL}" 2>&1 || true | ||
| # --previous survives a container restart across a reboot — the log that | ||
| # actually explains a tuning-reboot crash is usually the previous one. | ||
| echo "===== ${ns}/${p} (previous, if any) =====" | ||
| _cd_bounded kubectl logs -n "${ns}" "${p#pod/}" --all-containers --previous \ | ||
| --tail="${CLUSTER_DEBUG_LOG_TAIL}" 2>&1 || true | ||
| } >> "${CLUSTER_DEBUG_DIR}/${logfile}" | ||
| done | ||
| done |
There was a problem hiding this comment.
🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win
Prioritize allowlisted operator/check namespaces before the general namespace sweep.
The loop visits every cluster namespace (in kubectl get ns's default, effectively alphabetical, order) and only checks CLUSTER_DEBUG_LOG_NAMESPACES after the unconditional pods/jobs/events sections. If the per-command 30s bound is exhausted repeatedly (plausible on the very degraded-apiserver conditions this collector targets) before the outer 8-minute workflow step timeout, generic namespaces alphabetically ahead of skyhook/gpu-operator/etc. (e.g. default, kube-system) could consume the budget before the documented highest-value namespaces are reached.
♻️ Proposed fix: iterate allowlisted namespaces first, then the rest
- for ns in $(_cd_bounded kubectl get ns -o name 2>/dev/null | sed 's|namespace/||'); do
+ local _all_ns _ordered_ns
+ _all_ns="$(_cd_bounded kubectl get ns -o name 2>/dev/null | sed 's|namespace/||')"
+ _ordered_ns="${CLUSTER_DEBUG_LOG_NAMESPACES} $(comm -23 <(printf '%s\n' ${_all_ns} | sort) <(printf '%s\n' ${CLUSTER_DEBUG_LOG_NAMESPACES} | tr ' ' '\n' | sort))"
+ for ns in ${_ordered_ns}; do📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| local ns | |
| for ns in $(_cd_bounded kubectl get ns -o name 2>/dev/null | sed 's|namespace/||'); do | |
| local nsfile="ns-${ns}.txt" | |
| _cd_section "[${ns}] pods (wide)" "${nsfile}" \ | |
| kubectl get pods -n "${ns}" -o wide | |
| _cd_section "[${ns}] jobs" "${nsfile}" \ | |
| kubectl get jobs -n "${ns}" -o wide | |
| _cd_section "[${ns}] events (by time)" "${nsfile}" \ | |
| kubectl get events -n "${ns}" --sort-by=.lastTimestamp | |
| # `describe pods` and full logs are limited to the operator/check namespaces | |
| # in the allowlist. `describe` renders literal (non-Secret) env values in its | |
| # Environment section; scoping it to trusted operator namespaces — rather than | |
| # every namespace — bounds credential/PII exposure in the public-repo artifact | |
| # (a UAT recipe override or third-party chart with a literal-env secret would | |
| # otherwise leak straight in). The get/events above still cover every namespace. | |
| case " ${CLUSTER_DEBUG_LOG_NAMESPACES} " in | |
| *" ${ns} "*) ;; | |
| *) continue ;; | |
| esac | |
| _cd_section "[${ns}] describe pods" "${nsfile}" \ | |
| kubectl describe pods -n "${ns}" | |
| local logfile="logs-${ns}.txt" p | |
| for p in $(_cd_bounded kubectl get pods -n "${ns}" -o name 2>/dev/null); do | |
| { | |
| echo "===== ${ns}/${p} (current) =====" | |
| _cd_bounded kubectl logs -n "${ns}" "${p#pod/}" --all-containers \ | |
| --tail="${CLUSTER_DEBUG_LOG_TAIL}" 2>&1 || true | |
| # --previous survives a container restart across a reboot — the log that | |
| # actually explains a tuning-reboot crash is usually the previous one. | |
| echo "===== ${ns}/${p} (previous, if any) =====" | |
| _cd_bounded kubectl logs -n "${ns}" "${p#pod/}" --all-containers --previous \ | |
| --tail="${CLUSTER_DEBUG_LOG_TAIL}" 2>&1 || true | |
| } >> "${CLUSTER_DEBUG_DIR}/${logfile}" | |
| done | |
| done | |
| local _all_ns _ordered_ns | |
| _all_ns="$(_cd_bounded kubectl get ns -o name 2>/dev/null | sed 's|namespace/||')" | |
| _ordered_ns="${CLUSTER_DEBUG_LOG_NAMESPACES} $(comm -23 <(printf '%s\n' ${_all_ns} | sort) <(printf '%s\n' ${CLUSTER_DEBUG_LOG_NAMESPACES} | tr ' ' '\n' | sort))" | |
| for ns in ${_ordered_ns}; do | |
| local nsfile="ns-${ns}.txt" | |
| _cd_section "[${ns}] pods (wide)" "${nsfile}" \ | |
| kubectl get pods -n "${ns}" -o wide | |
| _cd_section "[${ns}] jobs" "${nsfile}" \ | |
| kubectl get jobs -n "${ns}" -o wide | |
| _cd_section "[${ns}] events (by time)" "${nsfile}" \ | |
| kubectl get events -n "${ns}" --sort-by=.lastTimestamp | |
| # `describe pods` and full logs are limited to the operator/check namespaces | |
| # in the allowlist. `describe` renders literal (non-Secret) env values in its | |
| # Environment section; scoping it to trusted operator namespaces — rather than | |
| # every namespace — bounds credential/PII exposure in the public-repo artifact | |
| # (a UAT recipe override or third-party chart with a literal-env secret would | |
| # otherwise leak straight in). The get/events above still cover every namespace. | |
| case " ${CLUSTER_DEBUG_LOG_NAMESPACES} " in | |
| *" ${ns} "*) ;; | |
| *) continue ;; | |
| esac | |
| _cd_section "[${ns}] describe pods" "${nsfile}" \ | |
| kubectl describe pods -n "${ns}" | |
| local logfile="logs-${ns}.txt" p | |
| for p in $(_cd_bounded kubectl get pods -n "${ns}" -o name 2>/dev/null); do | |
| { | |
| echo "===== ${ns}/${p} (current) =====" | |
| _cd_bounded kubectl logs -n "${ns}" "${p#pod/}" --all-containers \ | |
| --tail="${CLUSTER_DEBUG_LOG_TAIL}" 2>&1 || true | |
| # --previous survives a container restart across a reboot — the log that | |
| # actually explains a tuning-reboot crash is usually the previous one. | |
| echo "===== ${ns}/${p} (previous, if any) =====" | |
| _cd_bounded kubectl logs -n "${ns}" "${p#pod/}" --all-containers --previous \ | |
| --tail="${CLUSTER_DEBUG_LOG_TAIL}" 2>&1 || true | |
| } >> "${CLUSTER_DEBUG_DIR}/${logfile}" | |
| done | |
| done |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/uat/lib/collect-debug.sh` around lines 244 - 279, Update the namespace
iteration around CLUSTER_DEBUG_LOG_NAMESPACES to process all allowlisted
operator/check namespaces first, then perform the general namespace sweep for
remaining namespaces. Preserve the existing pods/jobs/events collection for
every namespace and the describe/log collection only for allowlisted namespaces,
while avoiding duplicate processing when a namespace appears in both groups.
…VIDIA#1744)" (NVIDIA#1788) Signed-off-by: Nathan Hensley <[email protected]>
Summary
Reverts #1744 (
feat(slinky-slurm): add AKS H100 recipe, Enroot/Pyxis support, and Gres/GPU config, commit7e54fca7).Motivation / Context
#1744 was squash-merged from a branch based on stale
main. Its diff did not only add the slinky-slurm feature — it also reverted unrelated work that had already landed onmain, including the UAT cluster debug-bundle collector (tests/uat/lib/collect-debug.sh, #1764) and a broad set of deletions across the bundler deployers (argocd/flux/helmfile), bundler config, and docs. This revert restores that clobbered work. The slinky-slurm feature can be re-landed cleanly on top of currentmain.Fixes: N/A
Related: #1744, #1764
Type of Change
Component(s) Affected
pkg/bundler,pkg/component/*)pkg/recipe)docs/,examples/)Implementation Notes
Produced with
git revert 7e54fca7; clean, no conflicts (64 files, +1753/-1072). The revert re-adds files #1744 deleted (notablytests/uat/lib/collect-debug.sh) and removes the files it added (e.g.recipes/overlays/h100-aks-ubuntu-training-slurm.yaml).Testing
Risk Assessment
git revertthat restores previously-reviewed, already-merged state.Rollout notes: Re-land the slinky-slurm feature in a fresh PR rebased on current
mainso it no longer clobbers intervening work.Checklist
make testwith-race)make lint)git commit -S)