Skip to content

fix(evidence): propagate CNCF section failures#1730

Merged
mchmarny merged 1 commit into
NVIDIA:mainfrom
hogeheer499-commits:fix/cncf-evidence-result-propagation
Jul 13, 2026
Merged

fix(evidence): propagate CNCF section failures#1730
mchmarny merged 1 commit into
NVIDIA:mainfrom
hogeheer499-commits:fix/cncf-evidence-result-propagation

Conversation

@hogeheer499-commits

@hogeheer499-commits hogeheer499-commits commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Propagate failed CNCF evidence sections to the existing Go collector instead of returning success with failed submission artifacts. Add explicit skip evidence for absent optional prerequisites and fail closed on missing or malformed verdicts.

Motivation / Context

The evidence script recorded section outcomes only in Markdown, so a genuine Result: FAIL never reached failed_sections or the CLI exit status. Optional components also need a distinct skip path so stock clusters do not fail simply because an inference gateway, supported operator, or cloud autoscaler is absent.

Fixes: #1692
Related: #1694

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Build/CI/tooling

Component(s) Affected

  • CLI (cmd/aicr, pkg/cli)
  • API server (cmd/aicrd, pkg/server)
  • Recipe engine / data (pkg/recipe)
  • Bundlers (pkg/bundler, pkg/component/*)
  • Collectors / snapshotter (pkg/collector, pkg/snapshotter)
  • Validator (pkg/validator)
  • Core libraries (pkg/errors, pkg/k8s)
  • Docs/examples (docs/, examples/)
  • Other: CNCF evidence collector (pkg/evidence/cncf)

Implementation Notes

Each section must now write exactly one authoritative PASS, SKIP, or FAIL verdict. Stale artifacts are removed before collection, and missing, unknown, conflicting, or malformed verdicts fail closed. Gateway, operator, and unsupported cloud-autoscaler prerequisites emit explicit skip artifacts; present but unhealthy workloads remain failures.

The parser remains compatible with Bash 3.2. A failed section is retained in the summary and makes the script return nonzero, which lets the existing Go collector add it to failed_sections without changing the Go interface.

Testing

make test
go test -race -count=1 ./pkg/evidence/cncf/...
golangci-lint run ./pkg/evidence/cncf/...
bash -n pkg/evidence/cncf/scripts/collect-evidence.sh
git diff --check HEAD^
  • make test: passed with the race detector; repository coverage 77.9% (75% required).
  • Final package race suite: passed; package coverage increased from 69.0% to 70.7%.
  • golangci-lint 2.12.2: zero issues.
  • ShellCheck produced no new diagnostics relative to main.
  • make qualify was not repeated in the pinned Go container because it did not include the repository's external tool suite. The affected final test, lint, syntax, and diff gates above were rerun.

Risk Assessment

  • Low — Isolated change, well-tested, easy to revert
  • Medium — Touches multiple components or has broader impact
  • High — Breaking change, affects critical paths, or complex rollout

Rollout notes: No migration is required. Automation that previously accepted failed evidence will now receive the intended nonzero result; absent optional prerequisites remain successful skips. One behavior change to note: Prometheus port-forward failure in the Dynamo, NIM, and trainer service-metrics paths now records Result: FAIL (previously an uncounted WARNING), so a cluster where Prometheus is unreachable will surface a section failure — confirm submission clusters have a reachable Prometheus. A Dynamo operator present with no DynamoGraphDeployment is treated as SKIP (absent prerequisite), not FAIL.

Checklist

  • Tests pass locally (make test with -race)
  • Linter passes (make lint)
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality
  • I updated docs if user-facing behavior changed
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S) — GPG signing info

@hogeheer499-commits
hogeheer499-commits requested a review from a team as a code owner July 11, 2026 17:46
@copy-pr-bot

copy-pr-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown
Contributor

Welcome to AICR, @hogeheer499-commits! Thanks for your first pull request.

Before review, please ensure:

  • All commits are signed off per the DCO
  • CI checks pass (tests, lint, security scan)
  • The PR description explains the why behind your changes

A maintainer will review this soon.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 2ca3e998-689e-41ba-af0d-b1f98e43b11c

📥 Commits

Reviewing files that changed from the base of the PR and between 37c6a6e and 25bb627.

📒 Files selected for processing (4)
  • docs/conformance/cncf/index.md
  • docs/user/validation.md
  • pkg/evidence/cncf/result_propagation_test.go
  • pkg/evidence/cncf/scripts/collect-evidence.sh

📝 Walkthrough

Walkthrough

The evidence script now parses authoritative PASS, SKIP, and FAIL results, removes stale artifacts before collection, and returns failure for failed evidence sections. Multiple prerequisite and connectivity paths now emit explicit SKIP or FAIL results. A new table-driven Go test exercises collector propagation across success, skip, failure, invalid-result, and unavailable-component scenarios.

Estimated code review effort: 4 (Complex) | ~45 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: propagating CNCF evidence section failures and skips.
Description check ✅ Passed The description aligns with the CNCF evidence propagation and SKIP handling changes.
Linked Issues check ✅ Passed The changes add SKIP, fail closed on malformed or missing verdicts, and return nonzero on FAIL as requested in #1692.
Out of Scope Changes check ✅ Passed The diff stays focused on CNCF evidence behavior, tests, and docs; no clear unrelated changes stand out.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@yuanchen8911 yuanchen8911 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue 1 should be fixed. Items 2 and 3 are notes/follow-ups. Everything else reviewed (verdict regex, main() tally, sourcing guard, consumer propagation path, emit-claim/claim_shape_test.go) is clean.

Comment thread pkg/evidence/cncf/scripts/collect-evidence.sh
Comment thread pkg/evidence/cncf/scripts/collect-evidence.sh
Comment thread pkg/evidence/cncf/scripts/collect-evidence.sh

@yuanchen8911 yuanchen8911 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes for the blocking Dynamo evidence failure propagation issue described in the review comments.

yuanchen8911 added a commit to hogeheer499-commits/aicr that referenced this pull request Jul 13, 2026
The robust-operator section recorded Result: FAIL when the Dynamo operator
was present but no DynamoGraphDeployment existed, collapsing a failed API
query and a successful zero-row query into the same 0. With section FAILs
now propagating to a nonzero exit, a stock Dynamo inference bundle +
--cncf-submission failed on the default path: the service-metrics section
deploys and cleans up its own DGD before the operator section runs, so the
operator section saw zero DGDs.

Distinguish a failed DGD query (fail closed) from a successful query with
zero rows (absent prerequisite -> SKIP), matching the SKIP treatment given
to absent gateway/operator/autoscaler prerequisites. Add a subprocess test
for the new branch and assert each section collector emits exactly one
column-zero verdict.

Fixes the cross-review finding on PR NVIDIA#1730.

Signed-off-by: Yuan Chen <yuanchen97@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pkg/evidence/cncf/result_propagation_test.go (1)

174-341: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Missing test for the DGD query-failure fail-closed branch.

The new operator-dynamo-no-dgd case (Line 230-235) covers the "successful query, zero rows → SKIP" branch, but there's no case exercising "query itself fails → FAIL (fail closed)" (collect-evidence.sh Line 2490-2491) — the exact branch this PR's fix and the prior critical review comment center on. A future edit to that fail-closed check would go unnoticed by this suite.

🧪 Suggested additional case

Harness (add alongside operator-dynamo-no-dgd):

+    operator-dynamo-query-failed)
+        kubectl() {
+            if [ "${1:-}" = "cluster-info" ]; then
+                return 0
+            fi
+            case " $* " in
+                *"dynamo-platform-dynamo-operator-controller-manager"*) echo "dynamo-operator 1/1" ;;
+                *" dynamographdeployments "*) return 1 ;;
+            esac
+            return 0
+        }
+        SECTION="operator"
+        ;;

Test table:

{
    name:              "operator DGD query failure fails closed",
    mode:              "operator-dynamo-query-failed",
    displayName:       "Robust AI Operator",
    wantStatus:        "FAIL",
    singleVerdictFile: "robust-operator.md",
    wantErr:           true,
},
🤖 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/evidence/cncf/result_propagation_test.go` around lines 174 - 341, Add a
table-driven case to TestEvidenceResultPropagatesThroughCollector for mode
"operator-dynamo-query-failed", asserting Robust AI Operator produces FAIL, sets
wantErr, and uses robust-operator.md as singleVerdictFile; ensure the harness
triggers the DGD query-error path rather than the successful zero-row SKIP path.
🤖 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.

Outside diff comments:
In `@pkg/evidence/cncf/result_propagation_test.go`:
- Around line 174-341: Add a table-driven case to
TestEvidenceResultPropagatesThroughCollector for mode
"operator-dynamo-query-failed", asserting Robust AI Operator produces FAIL, sets
wantErr, and uses robust-operator.md as singleVerdictFile; ensure the harness
triggers the DGD query-error path rather than the successful zero-row SKIP path.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 423ae348-b308-4f90-9f7b-58a459d23ccd

📥 Commits

Reviewing files that changed from the base of the PR and between 1dac5c7 and c71c675.

📒 Files selected for processing (2)
  • pkg/evidence/cncf/result_propagation_test.go
  • pkg/evidence/cncf/scripts/collect-evidence.sh

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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 `@pkg/evidence/cncf/result_propagation_test.go`:
- Around line 251-258: Update the test cases for the operator DGD query failure
scenario in result propagation validation to assert that robust-operator.md
contains exactly the single marker **Result: FAIL**, rather than only checking
the marker count. Apply the same artifact-content assertion to the corresponding
case around the later referenced test block, while preserving the existing
nonzero-error expectation.
🪄 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: 7841bea2-db16-4a4d-b51b-9f75aef6f1f3

📥 Commits

Reviewing files that changed from the base of the PR and between c71c675 and e37f7fd.

📒 Files selected for processing (1)
  • pkg/evidence/cncf/result_propagation_test.go

Comment thread pkg/evidence/cncf/result_propagation_test.go
yuanchen8911
yuanchen8911 previously approved these changes Jul 13, 2026

@yuanchen8911 yuanchen8911 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed the three issues

@mchmarny
mchmarny enabled auto-merge (squash) July 13, 2026 15:53
yuanchen8911 added a commit to hogeheer499-commits/aicr that referenced this pull request Jul 13, 2026
The --cncf-submission behavior change — each section emits exactly one
PASS/SKIP/FAIL verdict, a FAIL now propagates to a non-zero exit, and absent
optional prerequisites are SKIP — was user-visible but undocumented. Add a
short note to docs/user/validation.md and docs/conformance/cncf/index.md.

Addresses cross-review docs finding on PR NVIDIA#1730.

Signed-off-by: Yuan Chen <yuanchen97@gmail.com>
Record section outcomes as PASS/SKIP/FAIL verdicts and propagate a genuine
FAIL to a nonzero exit so the existing Go collector adds it to failed_sections.
Each collector writes exactly one authoritative verdict; missing, unknown,
conflicting, or malformed verdicts fail closed, and stale artifacts are
removed before collection.

Absent optional prerequisites emit an explicit SKIP: no inference gateway,
no supported operator, an unsupported cluster-autoscaling provider, or a
Dynamo operator present with no DynamoGraphDeployment (an absent inference
workload is a missing prerequisite, not a failure). A failed DGD query stays
FAIL (fail closed); present-but-unhealthy workloads remain failures.

Cover the result path with a subprocess test that runs the shipped script
without a cluster, including the SKIP branches, the failed-query branch, and
a single-verdict-per-section assertion. Document the verdict/exit contract in
docs/user/validation.md and docs/conformance/cncf/index.md.

Fixes: NVIDIA#1692

Signed-off-by: JS van Dijk <267467744+hogeheer499-commits@users.noreply.github.com>
@yuanchen8911
yuanchen8911 force-pushed the fix/cncf-evidence-result-propagation branch from 37c6a6e to 25bb627 Compare July 13, 2026 15:59

@yuanchen8911 yuanchen8911 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

Recipe evidence check

No leaf overlays affected by this PR.

This gate is warning-only and never blocks merge.

@mchmarny
mchmarny disabled auto-merge July 13, 2026 16:18
@mchmarny
mchmarny merged commit 713f263 into NVIDIA:main Jul 13, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

evidence: propagate section FAIL as collection error; add SKIP for absent prerequisites

3 participants