Skip to content

[None][infra] CBTS code coverage date early save - #17253

Merged
crazydemo merged 8 commits into
NVIDIA:mainfrom
crazydemo:cbts-early-coverage
Aug 13, 2026
Merged

[None][infra] CBTS code coverage date early save#17253
crazydemo merged 8 commits into
NVIDIA:mainfrom
crazydemo:cbts-early-coverage

Conversation

@crazydemo

@crazydemo crazydemo commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Dev Engineer Review

  • Added uploadArchCoverage(String arch, pipeline, testFilter) in jenkins/L0_MergeRequest.groovy.
  • The helper downloads single-GPU result archives, extracts per-process SQLite coverage files, merges them into an architecture-specific touch database, compresses the database, and uploads it to cbts-coverage/.
  • Architecture filters separate SBSA stages from x86_64 stages.
  • The helper runs after single-GPU stages and before related multi-GPU stages.
  • Test-result links now use ${UPLOAD_PATH}.
  • CBTS coverage eligibility now applies beyond PostMerge jobs. Limit this scope before merge.
  • Confirm that failed or empty wget listings, timeout or interruption exceptions, extraction failures, merge failures, and upload failures remain best-effort.
  • Report the pre-merge wall-clock impact.
  • Confirm that artifact names and architecture filters match downstream coverage-generation logic.

QA Engineer Review

No test changes.

Description

Test Coverage

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

@crazydemo
crazydemo marked this pull request as ready for review August 4, 2026 12:41
@crazydemo
crazydemo requested a review from a team as a code owner August 4, 2026 12:41
@crazydemo
crazydemo requested review from mlefeb01 and niukuo August 4, 2026 12:41
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

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

Walkthrough

CBTS coverage eligibility now uses ENABLE_CBTS_COVERAGE. The pipeline merges and uploads single-GPU coverage for x86_64 and SBSA before multi-GPU testing. Result links now use UPLOAD_PATH.

Changes

CBTS coverage pipeline

Layer / File(s) Summary
Enable CBTS coverage eligibility
jenkins/L0_MergeRequest.groovy
CBTS coverage eligibility now depends only on ENABLE_CBTS_COVERAGE, not on the job type.
Merge and upload architecture coverage
jenkins/L0_MergeRequest.groovy
uploadArchCoverage downloads and extracts single-GPU archives, merges SQLite coverage files, uploads the compressed architecture database, uses UPLOAD_PATH for result links, and runs before x86_64 and SBSA multi-GPU stages.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Pipeline
  participant AlpinePod
  participant ResultStorage
  Pipeline->>AlpinePod: Run uploadArchCoverage
  AlpinePod->>ResultStorage: Download single-GPU result archives using UPLOAD_PATH
  AlpinePod->>AlpinePod: Extract and merge SQLite coverage files
  AlpinePod->>ResultStorage: Upload compressed architecture touch database
  Pipeline->>Pipeline: Start multi-GPU testing
Loading

Suggested reviewers: mlefeb01

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description contains only the template and omits the implementation rationale, changed behavior, test coverage, and requested reviewer details. Add a concise issue and solution summary, describe the coverage and upload changes, list relevant tests, and document pre-merge impact and known limitations.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required format and identifies the CBTS code coverage infrastructure change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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: 3

🤖 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 `@jenkins/L0_MergeRequest.groovy`:
- Around line 1618-1619: Move the x86_64 uploadArchCoverage call in
jenkins/L0_MergeRequest.groovy at lines 1618-1619 immediately after the x86_64
single-GPU stage and before the requireMultiGpuTesting early return; likewise
move the SBSA uploadArchCoverage call at lines 1736-1737 immediately after the
SBSA single-GPU stage and before its gate, preserving both existing calls and
arguments.
- Line 1211: Update the testResultLink construction in launchJob to use the
configured UPLOAD_PATH value rather than the hardcoded Artifactory path,
preserving the existing JOB_NAME and BUILD_NUMBER segments before appending
/test-results so overridden upload paths resolve the downloaded archives
correctly.
- Around line 1215-1219: Update the coverage download and extraction flow around
trtllm_utils.llmExecStepWithRetry and the results-*.tar.gz find command to
isolate artifacts for the requested architecture. Use architecture-specific
result directories, or filter downloads so only the requested single-GPU archive
is extracted, ensuring coverage from the other architecture cannot be merged and
duplicate SQLite basenames cannot overwrite each other.
🪄 Autofix

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: CHILL

Plan: Enterprise

Run ID: 481b671a-3656-4d2b-8da0-2a7608073b0a

📥 Commits

Reviewing files that changed from the base of the PR and between 60e7fca and 92cf856.

📒 Files selected for processing (1)
  • jenkins/L0_MergeRequest.groovy

Comment thread jenkins/L0_MergeRequest.groovy Outdated
Comment thread jenkins/L0_MergeRequest.groovy
Comment thread jenkins/L0_MergeRequest.groovy Outdated
@crazydemo
crazydemo force-pushed the cbts-early-coverage branch from 92cf856 to 1e75000 Compare August 4, 2026 12:46
@crazydemo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --stage-list "A10-PyTorch-1, GB10-PyTorch-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63755 [ run ] triggered by Bot. Commit: 1e75000 Link to invocation

@crazydemo

Copy link
Copy Markdown
Collaborator Author

/bot kill

@crazydemo
crazydemo force-pushed the cbts-early-coverage branch from 1e75000 to 803080f Compare August 4, 2026 13:43
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63768 [ kill ] triggered by Bot. Commit: 803080f Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63755 [ run ] completed with state ABORTED. Commit: 1e75000

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63768 [ kill ] completed with state SUCCESS. Commit: 803080f
Successfully killed previous jobs for commit 803080f

Link to invocation

@crazydemo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --stage-list "A10-PyTorch-1, A30-PyTorch-1, GB300-PyTorch-1, GB10-PyTorch-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63771 [ run ] triggered by Bot. Commit: 803080f Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63771 [ run ] completed with state SUCCESS. Commit: 803080f
/LLM/main/L0_MergeRequest_PR pipeline #51721 (Partly Tested) completed with status: 'SUCCESS'

CI Report

Link to invocation

@BowenFu

BowenFu commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Could you tighten the rollout and failure handling before merge?

  • Dropping the PostMerge condition enables CBTS collection and upload in every pre-merge pipeline. Please use an expiring opt-in or narrow allowlist and report the measured wall-clock impact.
  • After the best-effort wget, check that index.html exists before running grep. Otherwise a listing failure becomes a generic caught exception and silently loses coverage. Please also preserve interruption/timeout signals instead of swallowing them in the broad catch.
  • Mention the unrelated ${UPLOAD_PATH} correction in the description.

@crazydemo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --stage-list "A10-PyTorch-1, A30-PyTorch-1, GB300-PyTorch-1, GB10-PyTorch-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63906 [ run ] triggered by Bot. Commit: d9a1488 Link to invocation

@BowenFu

BowenFu commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

The arch filter in d9a1488b3 is a real fix for a real problem, but two things from my earlier comment are still open, and the new commit adds a third.

  1. The gate flip is still the change. testFilter[(CBTS_COVERAGE)] = ENABLE_CBTS_COVERAGE with // TODO: restrict back to PostMerge after coverage upload is verified is unchanged, and ENABLE_CBTS_COVERAGE is true. So every pre-merge pipeline now runs instrumented single-GPU stages plus a serialized upload pod (up to 15 min) ahead of multi-GPU. A TODO isn't a rollback mechanism for shared pre-merge cost — a env-gated flag you flip back, or a follow-up PR already opened, would be.

  2. The new arch split is a denylist, not an allowlist. grep -v -E '^results-(GH200|GB10|GB200|GB300|CPU-Generic-arm)-' means any future SBSA stage prefix silently lands in the x86_64 bucket rather than failing loudly — which is the exact cross-contamination this commit is fixing, just deferred to the next new arm board. Inverting it (match a known x86_64 prefix set, and echo anything unmatched) would keep it self-reporting.

  3. sh "cat index.html | grep ..." at the new site runs unconditionally after a wget with allowStepFailed: true, same as the existing one — on a failed fetch it dies with a generic error into the broad catch (Exception e). A if (!fileExists('index.html')) { echo ...; return } keeps the "non-fatal" claim honest and makes the log say why.

None of this is a correctness objection to the upload helper itself, which reads fine.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63906 [ run ] completed with state SUCCESS. Commit: d9a1488
/LLM/main/L0_MergeRequest_PR pipeline #51842 (Partly Tested) completed with status: 'SUCCESS'

CI Report

Link to invocation

@crazydemo

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63951 [ run ] triggered by Bot. Commit: ef95272 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63951 [ run ] completed with state SUCCESS. Commit: ef95272
/LLM/main/L0_MergeRequest_PR pipeline #51886 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@crazydemo

Copy link
Copy Markdown
Collaborator Author

/bot skip --comment "the failure is not related to this pr"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64011 [ skip ] triggered by Bot. Commit: ef95272 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64011 [ skip ] completed with state SUCCESS. Commit: ef95272
Skipping testing for commit ef95272

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65029 [ run ] triggered by Bot. Commit: 2bdd0b4 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65029 [ run ] completed with state SUCCESS. Commit: 2bdd0b4
/LLM/main/L0_MergeRequest_PR pipeline #52838 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@crazydemo
crazydemo force-pushed the cbts-early-coverage branch from 2bdd0b4 to ce47502 Compare August 11, 2026 04:01
@crazydemo

Copy link
Copy Markdown
Collaborator Author

/bot skip --comment "skip ci as only do low risk rebase"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65207 [ skip ] triggered by Bot. Commit: ce47502 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65207 [ skip ] completed with state SUCCESS. Commit: ce47502
Skipping testing for commit ce47502

Link to invocation

@niukuo niukuo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved with the non-blocking helper-timeout follow-up noted inline.

@crazydemo

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list ""

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65476 [ run ] triggered by Bot. Commit: 72706b4 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65476 [ run ] completed with state SUCCESS. Commit: 72706b4
/LLM/main/L0_MergeRequest_PR pipeline #53222 (Partly Tested) completed with status: 'SUCCESS'

CI Report

Link to invocation

@crazydemo

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65505 [ run ] triggered by Bot. Commit: 72706b4 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65505 [ run ] completed with state FAILURE. Commit: 72706b4

Link to invocation

crazydemo and others added 8 commits August 12, 2026 13:52
…pipeline

In official post-merge runs, single-GPU coverage data is ready well before
multi-GPU stages finish, but the selector had to wait for the full pipeline
to complete before any coverage artifact appeared on Artifactory.

Add uploadArchCoverage(arch) called immediately after each arch's single-GPU
job (before multi-GPU starts). It spins up a lightweight alpine K8s pod,
downloads the already-uploaded single-GPU result tarballs, merges the
.cbtscov.*.sqlite files via pystart_report.py (sqlite only, no HTML), and
uploads cbts_pystart_report_{arch}.tar.gz to cbts-coverage/.

Update artifact.py to prefer these early per-arch artifacts when the selector
fetches the touch DB: if either cbts_pystart_report_x86_64.tar.gz or
cbts_pystart_report_SBSA.tar.gz exists for the latest build, their sqlite
files are merged and returned immediately without waiting for the complete
cbts_pystart_report.tar.gz (which collectTestResults still uploads at the
end with full single+multi-GPU data and HTML report).

Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com>
…load verification

Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com>
…sult collection

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com>
…ent cross-contamination

x86_64 and SBSA jobs upload to the same test-results directory. Without
filtering, each arch's early coverage sqlite ends up containing data from
both architectures. Filter the download list by known SBSA stage name
prefixes (GH200-, GB10-, GB200-, GB300-, CPU-Generic-arm-) so each report
only contains its own arch's coverage data.

Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com>
…s for upload verification"

This reverts commit 803080f.

Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com>
…ent cross-contamination

x86_64 and SBSA jobs upload to the same test-results directory. Without
filtering, each arch's early coverage sqlite ends up containing data from
both architectures. Filter the download list by known SBSA stage name
prefixes (GH200-, GB10-, GB200-, GB300-, CPU-Generic-arm-) so each report
only contains its own arch's coverage data.

Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com>
Broad Exception catch was swallowing Jenkins pipeline cancellations and
user aborts (FlowInterruptedException / InterruptedException), causing
the helper to log them as non-fatal and continue. Rethrow to match the
pattern used by other best-effort blocks in this file.

Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com>
…rchCoverage

The helper-specific timeout(15, MINUTES) raises FlowInterruptedException,
which the broad InterruptedException handler rethrew, making the uploader
timeout fail the entire pipeline against the non-fatal contract of this
helper. Catch FlowInterruptedException and treat only an ExceededTimeout
cause as non-fatal, continuing to rethrow user aborts and upstream
pipeline interruptions.

Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com>
@crazydemo
crazydemo force-pushed the cbts-early-coverage branch from 72706b4 to 709f83a Compare August 12, 2026 05:52
@crazydemo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65509 [ run ] triggered by Bot. Commit: 709f83a Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65509 [ run ] completed with state SUCCESS. Commit: 709f83a
/LLM/main/L0_MergeRequest_PR pipeline #53247 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@crazydemo

Copy link
Copy Markdown
Collaborator Author

/bot skip --comment "skip ci as the failure is not related to this pr"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65753 [ skip ] triggered by Bot. Commit: 709f83a Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65753 [ skip ] completed with state SUCCESS. Commit: 709f83a
Skipping testing for commit 709f83a

Link to invocation

@crazydemo
crazydemo merged commit 6e931c9 into NVIDIA:main Aug 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants