Skip to content

[TRTLLMINF-218][infra] Gate multi-GPU CI stages behind 'ci: full pre-merge approved' label - #16578

Merged
juney-nvidia merged 6 commits into
NVIDIA:mainfrom
ZhanruiSunCh:user/zhanruis/0716_multi_gpu_label_gate
Aug 4, 2026
Merged

[TRTLLMINF-218][infra] Gate multi-GPU CI stages behind 'ci: full pre-merge approved' label#16578
juney-nvidia merged 6 commits into
NVIDIA:mainfrom
ZhanruiSunCh:user/zhanruis/0716_multi_gpu_label_gate

Conversation

@ZhanruiSunCh

@ZhanruiSunCh ZhanruiSunCh commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Gate x86_64 and SBSA multi-GPU pre-merge CI stages behind the GitHub label ci: full pre-merge approved. Only active members of NVIDIA/trt-llm-ci-approvers can authorize this label.

Key Changes

File Change
jenkins/L0_MergeRequest.groovy requireMultiGpuApprovalLabel() — calls shared lib to verify label existence + labeler team membership; shows [Blocked] stage on failure (UNSTABLE, no fail-fast)
jenkins/L0_Test.groovy MULTI_GPU_RUN_WITH_SINGLE — configurable exempt list; matching multi-GPU stages run in single-GPU job without label
.github/workflows/full-premerge-approval.yml GitHub Actions label guard — removes unauthorized label + posts deny comment
.github/workflows/bot-command.yml Updated help text for --add-multi-gpu-test / --only-multi-gpu-test
docs/source/developer-guide/ci-overview.md New "Multi-GPU Tests" section + copyright header
trtllm-jenkins-shared-lib (MR #84) validatePRLabelApproval() — unified label + author validation
trtllm-github-ci (MR #86) Wrapper marker detection + PR comment notification

Design Decisions

  • Fail-open: GitHub API failure → CI proceeds (not blocked by label check infra issues)
  • No fail-fast: Label block uses catchError(buildResult: 'UNSTABLE'), does not kill parallel branches (e.g. SBSA build)
  • Label + author verification: Shared lib validatePRLabelApproval() checks both label existence and labeler is active team member
  • GitLab MR exempt: Internal system, already has GitLab permission controls
  • PostMerge exempt: Has its own approval mechanism (ci: post-merge approved)

Test Coverage

A. GitHub Actions Label Guard

# Scenario Result
A1 Non-approver adds label → label removed + deny comment ✅ Passed
A2 Approver adds label → label retained ✅ Passed

B. Jenkins Multi-GPU Gate

Triggered by: file change auto-detection / --add-multi-gpu-test / --only-multi-gpu-test / --post-merge / --stage-list with multi-GPU stage

# Scenario Stage shown Build result Fail-fast Result
B1 Label absent [Test-x86_64-Multi-GPU] Blocked (red) UNSTABLE No ✅ Passed
B2 Label present + non-approver [Test-x86_64-Multi-GPU] Blocked (red) UNSTABLE No ✅ Passed
B3 Label present + approver [Test-x86_64-Multi-GPU] Remote Run normal Depends on tests N/A ✅ Passed
B4 GitHub API failure Remote Run normal (fail-open) Depends on tests N/A By code review

Blocked stage error messages:

  • B1: x86_64 Multi-GPU tests blocked: label 'ci: full pre-merge approved' is not present on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI.
  • B2: x86_64 Multi-GPU tests blocked: label 'ci: full pre-merge approved' was applied by 'xxx' who is not an active member of NVIDIA/trt-llm-ci-approvers. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI.

SBSA behavior is identical (stage name uses SBSA instead of x86_64).

C. Exemptions (label check skipped)

# Scenario Jenkins log Result
C1 PostMerge pipeline Skipping label check: PostMerge pipeline is exempt By code review
C2 GitLab MR trigger Skipping label check: not a GitHub PR (no GITHUB_PR_API_URL) ✅ Passed
C3 No multi-GPU triggered (normal /bot run) No label check log ✅ Passed

D. MULTI_GPU_RUN_WITH_SINGLE

# Scenario Result
D1 List empty (current default) — all multi-GPU stages require label ✅ Passed
D2 List with matching patterns — matched stages run in single-GPU job Not tested (future use)

PR Checklist

Dev Engineer Review

  • Added authorization guard for the ci: full pre-merge approved label, including unauthorized-label removal and safe handling of newer approval events.
  • Gated x86_64 and SBSA multi-GPU pre-merge stages while preserving post-merge and GitLab MR exemptions.
  • Added configurable single-GPU exemptions for selected multi-GPU stages.
  • Updated /bot run help text and CI documentation, including PerfSanity post-merge selectors.
  • No test-list or test-code files were modified.

QA Engineer Review

No test changes.

@coderabbitai

coderabbitai Bot commented Jul 19, 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

The PR adds approval-label validation, gates pre-merge x86_64 and SBSA multi-GPU Jenkins stages, supports configurable single-GPU routing for selected jobs, and updates bot help and CI documentation.

Changes

Multi-GPU approval label enforcement

Layer / File(s) Summary
Approval label validation workflow
.github/workflows/full-premerge-approval.yml
Validates the latest approval-label event against active membership in the NVIDIA/trt-llm-ci-approvers team, removing unverified labels and commenting on the pull request.
Jenkins multi-GPU stage gates
jenkins/L0_MergeRequest.groovy
Checks pull-request labels and applies the approval-label gate to x86_64 and SBSA multi-GPU stages for pre-merge jobs.
Configurable multi-GPU job routing
jenkins/L0_Test.groovy
Adds wildcard-based configuration for moving selected multi-GPU stages into the single-GPU job set.
Bot help and CI guidance
.github/workflows/bot-command.yml, docs/source/developer-guide/ci-overview.md
Documents the required labels, approver team, rerun command, stage-selector rules, and pipeline exemptions.

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

Sequence Diagram(s)

sequenceDiagram
  participant GitHub
  participant ApprovalWorkflow
  participant TeamMembershipAPI
  participant Jenkins
  participant MultiGPUStages
  GitHub->>ApprovalWorkflow: Apply ci: full pre-merge approved
  ApprovalWorkflow->>GitHub: Fetch latest label event
  ApprovalWorkflow->>TeamMembershipAPI: Verify labeling actor
  TeamMembershipAPI-->>ApprovalWorkflow: Return membership status
  ApprovalWorkflow->>GitHub: Remove label and comment if unverified
  Jenkins->>GitHub: Validate pull-request approval label
  GitHub-->>Jenkins: Return label authorization status
  Jenkins->>MultiGPUStages: Continue or fail pre-merge multi-GPU stage
Loading

Suggested reviewers: chzblych

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise, specific, and matches the main change: gating multi-GPU CI stages behind the approval label.
Description check ✅ Passed The description covers the required intent, implementation, test coverage, and checklist, with only minor heading mismatches from the template.
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 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 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: 4

🧹 Nitpick comments (1)
jenkins/L0_MergeRequest.groovy (1)

1574-1589: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract the duplicated multi-GPU label gate into a helper. Both stages carry identical gate logic (label check, currentBuild.description marker, and error message) differing only by the x86_64/SBSA arch string. Fold it into one helper (e.g. requireMultiGpuApprovalLabel(pipeline, globalVars, arch)) so the exemption rules, marker HTML, and error text stay in sync.

  • jenkins/L0_MergeRequest.groovy#L1574-L1589: replace the inline x86_64 gate with a call to the shared helper, passing "x86_64".
  • jenkins/L0_MergeRequest.groovy#L1701-L1716: replace the inline SBSA gate with the same helper, passing "SBSA".
🤖 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 `@jenkins/L0_MergeRequest.groovy` around lines 1574 - 1589, Extract the
duplicated multi-GPU approval gate into a shared requireMultiGpuApprovalLabel
helper that accepts pipeline, globalVars, and arch, preserving the GitHub PR and
PostMerge exemptions, label check, description marker, and arch-specific error
text. Replace the inline gate at jenkins/L0_MergeRequest.groovy lines 1574-1589
with a helper call using "x86_64", and the gate at lines 1701-1716 with a call
using "SBSA".
🤖 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/source/developer-guide/ci-overview.md`:
- Line 108: Add the repository-required NVIDIA copyright header at the beginning
of ci-overview.md and set its year to 2026, leaving the existing “Multi-GPU
Tests” documentation unchanged.
- Line 108: Add the Multi-GPU Tests heading to the table of contents using the
`#multi-gpu-tests` anchor, then renumber all subsequent entries to preserve the
document’s section order.
- Around line 119-123: Update the rerun instructions near the multi-GPU command
to preserve the originally selected mode: tell readers to rerun the same command
they used, and include distinct examples for --only-multi-gpu-test and
--add-multi-gpu-test so the broader pipeline is not selected unintentionally.

In `@jenkins/L0_MergeRequest.groovy`:
- Around line 660-668: Update the curl invocation in the pipeline.sh call to
include the --fail option alongside --silent, ensuring HTTP error responses
produce a non-zero exit status and reach the existing fail-open catch handler.
Leave the JSON parsing and normal successful-response behavior unchanged.

---

Nitpick comments:
In `@jenkins/L0_MergeRequest.groovy`:
- Around line 1574-1589: Extract the duplicated multi-GPU approval gate into a
shared requireMultiGpuApprovalLabel helper that accepts pipeline, globalVars,
and arch, preserving the GitHub PR and PostMerge exemptions, label check,
description marker, and arch-specific error text. Replace the inline gate at
jenkins/L0_MergeRequest.groovy lines 1574-1589 with a helper call using
"x86_64", and the gate at lines 1701-1716 with a call using "SBSA".
🪄 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: CHILL

Plan: Enterprise

Run ID: 1987f20b-6a09-48aa-a110-cdf448988613

📥 Commits

Reviewing files that changed from the base of the PR and between 176041b and 9f82671.

📒 Files selected for processing (4)
  • .github/workflows/bot-command.yml
  • .github/workflows/full-premerge-approval.yml
  • docs/source/developer-guide/ci-overview.md
  • jenkins/L0_MergeRequest.groovy

Comment thread docs/source/developer-guide/ci-overview.md
Comment thread docs/source/developer-guide/ci-overview.md Outdated
Comment thread jenkins/L0_MergeRequest.groovy Outdated
@ZhanruiSunCh
ZhanruiSunCh requested a review from chzblych July 19, 2026 15:57
@ZhanruiSunCh
ZhanruiSunCh force-pushed the user/zhanruis/0716_multi_gpu_label_gate branch from 9f82671 to eb669b5 Compare July 22, 2026 09:28

@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: 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 @.github/workflows/full-premerge-approval.yml:
- Around line 157-222: The cleanup flow around the timeline re-check and
issues.removeLabel must reconcile the latest approval event after deletion to
detect an intervening authorized label addition, restore that verified newer
approval label, and stop without posting a denial comment. Track whether this
run actually removed the unauthorized state, and only create the denial comment
when removal succeeded without a valid newer approval; handle concurrent 404
removals 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: CHILL

Plan: Enterprise

Run ID: 50965d17-a352-4c2b-ab3d-fc2ceeadfadd

📥 Commits

Reviewing files that changed from the base of the PR and between 9f82671 and eb669b5.

📒 Files selected for processing (4)
  • .github/workflows/bot-command.yml
  • .github/workflows/full-premerge-approval.yml
  • docs/source/developer-guide/ci-overview.md
  • jenkins/L0_MergeRequest.groovy
🚧 Files skipped from review as they are similar to previous changes (3)
  • jenkins/L0_MergeRequest.groovy
  • .github/workflows/bot-command.yml
  • docs/source/developer-guide/ci-overview.md

Comment thread .github/workflows/full-premerge-approval.yml

@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: 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 `@jenkins/L0_Test.groovy`:
- Around line 2082-2085: Populate MULTI_GPU_RUN_WITH_SINGLE with the intended
multi-GPU stage name patterns so matching stages can be exempted from
approval-label gating. Preserve the existing relocation logic at
jenkins/L0_Test.groovy lines 5893-5901; no direct change is required there.
🪄 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: CHILL

Plan: Enterprise

Run ID: e8189e40-30e3-41f8-8ab4-6092445a46ba

📥 Commits

Reviewing files that changed from the base of the PR and between c168748 and 8878d27.

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

Comment thread jenkins/L0_Test.groovy
@ZhanruiSunCh
ZhanruiSunCh force-pushed the user/zhanruis/0716_multi_gpu_label_gate branch from 8878d27 to 408f423 Compare July 24, 2026 08:50
@ZhanruiSunCh

Copy link
Copy Markdown
Collaborator Author

/bot run --add-multi-gpu-test

@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 `@jenkins/L0_MergeRequest.groovy`:
- Line 1620: Move the requireMultiGpuApprovalLabel(...) call outside and before
the surrounding try blocks at both jenkins/L0_MergeRequest.groovy lines
1620-1620 and 1737-1737, leaving each approval failure uncaught by the ignore
handlers so denial remains blocking.

In `@jenkins/L0_Test.groovy`:
- Around line 5940-5950: Remove the unconditional test-only bypass block
surrounding the if (true) statement, including its forced multi-GPU marker,
logging, and early return. Preserve the normal singleGpuJobs execution flow in
the surrounding test logic.
🪄 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: CHILL

Plan: Enterprise

Run ID: 350e4bd0-4cef-42c1-9276-1f4d6bac30e2

📥 Commits

Reviewing files that changed from the base of the PR and between 8878d27 and 408f423.

📒 Files selected for processing (5)
  • .github/workflows/bot-command.yml
  • .github/workflows/full-premerge-approval.yml
  • docs/source/developer-guide/ci-overview.md
  • jenkins/L0_MergeRequest.groovy
  • jenkins/L0_Test.groovy
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/bot-command.yml
  • docs/source/developer-guide/ci-overview.md

Comment thread jenkins/L0_MergeRequest.groovy Outdated
Comment thread jenkins/L0_Test.groovy Outdated
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61546 [ run ] triggered by Bot. Commit: 408f423 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61546 [ run ] completed with state FAILURE. Commit: 408f423
/LLM/main/L0_MergeRequest_PR pipeline #49758 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

@ZhanruiSunCh
ZhanruiSunCh force-pushed the user/zhanruis/0716_multi_gpu_label_gate branch from 408f423 to e14a237 Compare July 24, 2026 09:38
@ZhanruiSunCh

Copy link
Copy Markdown
Collaborator Author

/bot run --add-multi-gpu-test

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61559 [ run ] triggered by Bot. Commit: e14a237 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61559 [ run ] completed with state FAILURE. Commit: e14a237
/LLM/main/L0_MergeRequest_PR pipeline #49770 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

@ZhanruiSunCh
ZhanruiSunCh force-pushed the user/zhanruis/0716_multi_gpu_label_gate branch from e14a237 to e157bcf Compare July 24, 2026 10:26
@ZhanruiSunCh

Copy link
Copy Markdown
Collaborator Author

/bot run --add-multi-gpu-test

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61565 [ run ] triggered by Bot. Commit: e157bcf Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61565 [ run ] completed with state FAILURE. Commit: e157bcf
/LLM/main/L0_MergeRequest_PR pipeline #49776 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

@ZhanruiSunCh
ZhanruiSunCh force-pushed the user/zhanruis/0716_multi_gpu_label_gate branch from e157bcf to 94fbb1c Compare July 27, 2026 03:57
@ZhanruiSunCh

Copy link
Copy Markdown
Collaborator Author

/bot run --add-multi-gpu-test

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61801 [ run ] triggered by Bot. Commit: 94fbb1c Link to invocation

@ZhanruiSunCh

Copy link
Copy Markdown
Collaborator Author

/bot run --add-multi-gpu-test

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62358 [ run ] triggered by Bot. Commit: d30a4d9 Link to invocation

@ZhanruiSunCh

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-multi-gpu-test

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62400 [ run ] triggered by Bot. Commit: 2dff6e8 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62358 [ run ] completed with state ABORTED. Commit: d30a4d9

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62400 [ run ] completed with state SUCCESS. Commit: 2dff6e8
/LLM/main/L0_MergeRequest_PR pipeline #50559 (Partly Tested) 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

@ZhanruiSunCh

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-multi-gpu-test

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62732 [ run ] triggered by Bot. Commit: 2dff6e8 Link to invocation

@ZhanruiSunCh ZhanruiSunCh added the ci: post-merge approved Approved by TRT-LLM CI approvers for broad post-merge CI requests label Jul 30, 2026
@github-actions github-actions Bot removed the ci: post-merge approved Approved by TRT-LLM CI approvers for broad post-merge CI requests label Jul 30, 2026
@github-actions

Copy link
Copy Markdown

Removed the "ci: post-merge approved" label because @ZhanruiSunCh could not be verified as an active member of NVIDIA/trt-llm-ci-approvers. Ask a member of that team to apply it.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62732 [ run ] completed with state SUCCESS. Commit: 2dff6e8
/LLM/main/L0_MergeRequest_PR pipeline #50866 (Partly Tested) completed with status: 'SUCCESS'

CI Report

Link to invocation

@ZhanruiSunCh

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit code review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

@ZhanruiSunCh: I’ll review the changes in this PR.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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: 1

🧹 Nitpick comments (1)
jenkins/L0_MergeRequest.groovy (1)

1617-1629: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract the duplicated "Blocked" stage scaffolding into a shared helper.

Both the x86_64 and SBSA multi-GPU gates repeat the same requireMultiGpuApprovalLabel() → check → stage("[...] Blocked") { catchError(...) { error ... } }return pattern. Consolidating into one helper reduces duplication and keeps blocked-stage behavior consistent if it needs to change later.

  • jenkins/L0_MergeRequest.groovy#L1617-L1629: replace with a call to a shared blockMultiGpuStageIfNeeded(pipeline, globalVars, "x86_64") helper that encapsulates the gate check, Blocked stage creation, and early return.
  • jenkins/L0_MergeRequest.groovy#L1746-L1755: replace with the same shared helper call for "SBSA".
♻️ Proposed helper
def blockMultiGpuStageIfNeeded(pipeline, globalVars, String arch) {
    def blockMsg = requireMultiGpuApprovalLabel(pipeline, globalVars, arch)
    if (blockMsg) {
        stage("[Test-${arch}-Multi-GPU] Blocked") {
            catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
                error blockMsg
            }
        }
        return true
    }
    return false
}

Then at each call site:

-                def x86LabelBlock = requireMultiGpuApprovalLabel(pipeline, globalVars, "x86_64")
-                if (x86LabelBlock) {
-                    stage("[Test-x86_64-Multi-GPU] Blocked") {
-                        catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
-                            error x86LabelBlock
-                        }
-                    }
-                    return
-                }
+                if (blockMultiGpuStageIfNeeded(pipeline, globalVars, "x86_64")) {
+                    return
+                }
🤖 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 `@jenkins/L0_MergeRequest.groovy` around lines 1617 - 1629, Extract the
duplicated multi-GPU label-gate handling into a shared
blockMultiGpuStageIfNeeded(pipeline, globalVars, arch) helper that performs
requireMultiGpuApprovalLabel, creates the appropriate Blocked stage with
catchError/error, and returns whether execution was blocked. Replace the x86_64
gate at jenkins/L0_MergeRequest.groovy lines 1617-1629 and the SBSA gate at
lines 1746-1755 with calls to this helper, returning early when it reports a
block.
🤖 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 647-693: The currentBuild.description update in
requireMultiGpuApprovalLabel() is not synchronized across parallel x86_64 and
SBSA branches. Protect the existing description-read and append assignment with
a Jenkins lock or equivalent shared mutex, while preserving the marker content
and block-reason behavior.

---

Nitpick comments:
In `@jenkins/L0_MergeRequest.groovy`:
- Around line 1617-1629: Extract the duplicated multi-GPU label-gate handling
into a shared blockMultiGpuStageIfNeeded(pipeline, globalVars, arch) helper that
performs requireMultiGpuApprovalLabel, creates the appropriate Blocked stage
with catchError/error, and returns whether execution was blocked. Replace the
x86_64 gate at jenkins/L0_MergeRequest.groovy lines 1617-1629 and the SBSA gate
at lines 1746-1755 with calls to this helper, returning early when it reports a
block.
🪄 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: CHILL

Plan: Enterprise

Run ID: 020ec368-67ad-4fe6-9b76-fd5e5f36a676

📥 Commits

Reviewing files that changed from the base of the PR and between 8878d27 and 2dff6e8.

📒 Files selected for processing (5)
  • .github/workflows/bot-command.yml
  • .github/workflows/full-premerge-approval.yml
  • docs/source/developer-guide/ci-overview.md
  • jenkins/L0_MergeRequest.groovy
  • jenkins/L0_Test.groovy
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/source/developer-guide/ci-overview.md

Comment thread jenkins/L0_MergeRequest.groovy
…merge approved' label

Gate x86_64 and SBSA multi-GPU pre-merge CI stages behind the GitHub
label 'ci: full pre-merge approved' so resource-intensive multi-GPU
tests only run when explicitly approved by a CI approver.

Changes:
- L0_MergeRequest.groovy: add hasGithubPRLabel() (fail-open, reuses
  github-cred-trtllm-ci); insert label check at the top of
  [Test-x86_64-Multi-GPU] and [Test-SBSA-Multi-GPU] Remote Run stages;
  write description marker so wrapper can surface call-to-action
- full-premerge-approval.yml: new GitHub Actions workflow (modeled after
  post-merge-approval.yml) to remove the label and post a deny comment
  when an unauthorized user applies the label
- bot-command.yml: document label requirement for --add-multi-gpu-test
  and --only-multi-gpu-test
- ci-overview.md: add Multi-GPU Tests section explaining label gating

PostMerge pipelines and GitLab MR builds are exempt from the check.
Wrapper (trtllm-github-ci) change tracked in GitLab branch
trtllminf-218-full-premerge-label (based on MR NVIDIA#86).

Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
- hasGithubPRLabel: add --fail --show-error to curl so HTTP errors
  (401/403/5xx) exit non-zero and reach the catch/fail-open handler
  instead of returning empty HTML that blocks CI
- Extract duplicated multi-GPU label gate logic into shared
  requireMultiGpuApprovalLabel() helper
- ci-overview.md: add NVIDIA copyright header, add Multi-GPU Tests
  entry to TOC, clarify rerun instructions for both
  --add-multi-gpu-test and --only-multi-gpu-test

Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
… add exempt stage list

- L0_MergeRequest.groovy: replace hasGithubPRLabel() with
  trtllm_utils.validatePRLabelApproval() from the shared lib, which
  verifies both label existence and labeler team membership; error
  message now distinguishes "label not present" from "labeler not
  authorized"; fail-open on API errors; echo reason on early return
- L0_Test.groovy: add MULTI_GPU_RUN_WITH_SINGLE exempt list; matching
  multi-GPU stages run inside the single-GPU job instead of waiting
  for the separate multi-GPU dispatch (which requires the label)

Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
…ror message

- requireMultiGpuApprovalLabel() now returns the block reason string
  (instead of boolean true) so callers can display the exact cause
- Blocked stage error message now shows whether the label is missing
  or was applied by an unauthorized user, plus guidance to contact
  NVIDIA/trt-llm-ci-approvers

Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
…mal stages

- Switch team slug to trt-llm-infra-devs for label validation testing
- Disable all x86 Kubernetes test stages (only doc build runs)
- Keep one multi-GPU SLURM stage to trigger the label gate marker
- Revert all [TEST] markers before merge

Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
…and minimal stages"

This reverts commit d30a4d9.

Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
@ZhanruiSunCh
ZhanruiSunCh force-pushed the user/zhanruis/0716_multi_gpu_label_gate branch from 2dff6e8 to 7703c47 Compare August 3, 2026 09:22
@ZhanruiSunCh

Copy link
Copy Markdown
Collaborator Author

/bot reuse-pipeline

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63412 [ reuse-pipeline ] triggered by Bot. Commit: 7703c47 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63412 [ reuse-pipeline ] completed with state SUCCESS. Commit: 7703c47
Reusing PR_Github #62732 (Partly Tested) for commit 7703c47

Link to invocation

@juney-nvidia
juney-nvidia merged commit 0a6d932 into NVIDIA:main Aug 4, 2026
7 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.

3 participants