Skip to content

fix(ci): run validators/ unit tests in make test, exclude from covergae gate#1918

Open
mohityadav8 wants to merge 1 commit into
NVIDIA:mainfrom
mohityadav8:fix/issue-1752-validator-tests-in-ci
Open

fix(ci): run validators/ unit tests in make test, exclude from covergae gate#1918
mohityadav8 wants to merge 1 commit into
NVIDIA:mainfrom
mohityadav8:fix/issue-1752-validator-tests-in-ci

Conversation

@mohityadav8

Copy link
Copy Markdown
Contributor

Makefile excluded /validators from 'go list ./...' in make test, so regression suites added in #1745/#1748 (and the older nvidia-smi, inference-perf, nccl, conformance tests) never ran in CI.

  • Drop -e /validators from the make test package filter.
  • Exclude validators/ from the test-coverage threshold calc (its package coverage is 41-92%, pulling aggregate from 80.0% to 75.7% and breaking the 80% gate) while still running its tests.

Fixes #1752

…ge gate

Makefile excluded /validators from 'go list ./...' in make test, so
regression suites added in NVIDIA#1745/NVIDIA#1748 (and the older nvidia-smi,
inference-perf, nccl, conformance tests) never ran in CI.

- Drop -e /validators from the make test package filter.
- Exclude validators/ from the test-coverage threshold calc (its
  package coverage is 41-92%, pulling aggregate from 80.0% to 75.7%
  and breaking the 80% gate) while still running its tests.

Fixes NVIDIA#1752

Signed-off-by: Mohit Yadav <ymohit799057@gmail.com>
@mohityadav8
mohityadav8 requested a review from a team as a code owner July 25, 2026 14:07
@copy-pr-bot

copy-pr-bot Bot commented Jul 25, 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.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Makefile now runs Go tests for validator packages by excluding only /tests/chainsaw/. It continues generating coverage.out. The coverage target filters /validators/ entries from that file before calculating the total coverage percentage.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: njhensley

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the CI test inclusion and coverage-gate change reflected in the PR.
Description check ✅ Passed The description directly matches the Makefile test and coverage updates in the changeset.
Linked Issues check ✅ Passed The PR restores validators to make test and applies a separate coverage gate policy, matching #1752's main requirements.
Out of Scope Changes check ✅ Passed The only changes are Makefile test and coverage filters, which are directly in scope for the issue.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 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 `@Makefile`:
- Around line 230-231: Update the coverage output in the test-coverage target so
it uses the same validator-excluding filter as the enforced coverage metric,
keeping the displayed total consistent with the reported percentage.
- Line 235: Update the coverage gate around the coverage variable to align with
the documented project-wide threshold: either remove the /validators/ exclusion
from the aggregate calculation, or add and enforce a separate validator coverage
policy and update the contributor testing documentation accordingly.
🪄 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: e3e0e1da-8358-4521-85c5-1944dfa606f0

📥 Commits

Reviewing files that changed from the base of the PR and between 7e0f4a1 and 9504036.

📒 Files selected for processing (1)
  • Makefile

Comment thread Makefile
Comment on lines 230 to 231
echo "Test coverage:"; \
go tool cover -func=coverage.out | tail -1

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep displayed coverage consistent with the enforced metric.

test-coverage invokes test, so it first prints coverage including validators and then reports the filtered percentage below. These totals can differ substantially; apply the same filter here or label this as all-package coverage.

🤖 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 `@Makefile` around lines 230 - 231, Update the coverage output in the
test-coverage target so it uses the same validator-excluding filter as the
enforced coverage metric, keeping the displayed total consistent with the
reported percentage.

Comment thread Makefile
.PHONY: test-coverage
test-coverage: test ## Runs tests and enforces coverage threshold (from .settings.yaml quality.coverage_threshold)
@coverage=$$(go tool cover -func=coverage.out | grep total | awk '{print $$3}' | sed 's/%//'); \
@coverage=$$(grep -v '/validators/' coverage.out | go tool cover -func=/dev/stdin | grep total | awk '{print $$3}' | sed 's/%//'); \

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.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Document the reduced scope of the coverage gate.

This now excludes validator coverage while docs/contributor/tests.md:94-96 still describes the threshold as project-wide. Either include validators in the aggregate or document and enforce a separate validator coverage policy, as required by the PR objective.

🤖 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 `@Makefile` at line 235, Update the coverage gate around the coverage variable
to align with the documented project-wide threshold: either remove the
/validators/ exclusion from the aggregate calculation, or add and enforce a
separate validator coverage policy and update the contributor testing
documentation accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Validator unit tests are excluded from standard CI

1 participant