Skip to content

Conversation

@ZhanruiSunCh
Copy link
Collaborator

@ZhanruiSunCh ZhanruiSunCh commented Nov 24, 2025

Summary by CodeRabbit

Release Notes

  • New Features

    • Added CI-specific image tagging functionality for improved version management in continuous integration builds.
    • Introduced dedicated CI build pipeline stages for streamlined workflow execution.
  • Improvements

    • Optimized CI build process by refining pipeline stage execution logic.
    • Enhanced git commit metadata handling for signed commits in CI workflows.

✏️ Tip: You can customize this high-level summary in your review settings.

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)

  • 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

/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...

Provide a user friendly way for developers to interact with a Jenkins server.

Run /bot [-h|--help] to print this help message.

See details below for each supported subcommand.

Details

run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]

Launch build/test pipelines. All previously running jobs will be killed.

--reuse-test (optional)pipeline-id (OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.

--disable-reuse-test (OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.

--disable-fail-fast (OPTIONAL) : Disable fail fast on build/tests/infra failures.

--skip-test (OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.

--stage-list "A10-PyTorch-1, xxx" (OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.

--gpu-type "A30, H100_PCIe" (OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.

--test-backend "pytorch, cpp" (OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.

--only-multi-gpu-test (OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.

--disable-multi-gpu-test (OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.

--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".

--detailed-log (OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.

--debug (OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in the stage-list parameter to access the appropriate container environment. Note: Does NOT update GitHub check status.

For guidance on mapping tests to stage names, see docs/source/reference/ci-overview.md
and the scripts/test_to_stage_mapping.py helper.

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip testing for latest commit on pull request. --comment "Reason for skipping build/test" is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

reuse-pipeline

reuse-pipeline

Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

@ZhanruiSunCh ZhanruiSunCh requested review from a team as code owners November 24, 2025 08:49
@ZhanruiSunCh
Copy link
Collaborator Author

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 24, 2025

📝 Walkthrough

Walkthrough

Added CI-focused build mode to Jenkins Docker image pipeline. When MODE is set to "build_for_ci", the pipeline executes a new updateCIImageTag stage, restricts build configurations to CI entries, suppresses non-CI stages, and handles Git metadata for signed commits with CI-specific image tag updates.

Changes

Cohort / File(s) Summary
CI Build Mode Implementation
jenkins/BuildDockerImage.groovy
Added global GITHUB_CREDENTIALS_ID and MODE variables. Introduced new updateCIImageTag() function for computing and persisting CI image tags, updating jenkins/current_image_tags.properties, and pushing changes to forked branch. Implemented conditional logic to restrict build configurations to CI entries when MODE == "build_for_ci", suppress non-CI stages (Upload Artifacts, Wait for Build Jobs Complete, Sanity Check, Security Checks), and enable new Update CI Image Tag stage. Enhanced Git metadata handling to parse Signed-off-by from latest commit and configure git credentials for signed commits.

Sequence Diagram(s)

sequenceDiagram
    participant Pipeline
    participant buildImage as buildImage()
    participant launchBuildJobs as launchBuildJobs()
    participant updateCIImageTag as updateCIImageTag()
    participant Git as Git/GitHub

    Pipeline->>Pipeline: Check MODE variable

    alt MODE == "build_for_ci"
        Pipeline->>buildImage: Filter configs to CI entries only
        activate buildImage
        buildImage->>buildImage: Build CI images
        deactivate buildImage
        
        Pipeline->>launchBuildJobs: Launch CI-specific jobs
        activate launchBuildJobs
        launchBuildJobs->>launchBuildJobs: Execute CI configs
        deactivate launchBuildJobs
        
        Pipeline->>updateCIImageTag: New stage: Update CI Image Tag
        activate updateCIImageTag
        updateCIImageTag->>Git: Parse Signed-off-by from commit
        updateCIImageTag->>Git: Configure git user
        updateCIImageTag->>Git: Compute CI image tags
        updateCIImageTag->>Git: Update current_image_tags.properties
        updateCIImageTag->>Git: Push to forked branch
        deactivate updateCIImageTag
    else MODE != "build_for_ci"
        Pipeline->>Pipeline: Execute standard pipeline flow
        Pipeline->>Pipeline: Include all stages (Artifacts, Sanity, Security, etc.)
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • updateCIImageTag function: Review new function logic for git metadata parsing, tag computation, and properties file updates
  • Conditional MODE logic: Verify correct filtering of build configurations and stage suppression across buildImage and launchBuildJobs functions
  • Git credential handling: Ensure Signed-off-by parsing and git configuration are correctly implemented
  • Stage orchestration: Confirm new stage integration and proper gating of existing stages based on MODE value

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is a template with no actual content filled in for Description or Test Coverage sections, and only the final checklist item is checked. Fill in the Description section explaining the issue and solution, provide Test Coverage section listing relevant tests, and ensure the PR title follows the required format with a ticket ID and type.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding support to build Docker images and run tests in a single CI pipeline, which aligns with the PR's infrastructure improvements.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (4)
jenkins/BuildDockerImage.groovy (4)

500-500: Duplicate assignment of stageName.

The stageName is set here at line 500 and again at line 510 within the buildJobs closure. The second assignment is redundant since the config object already has this property set.

Consider removing the duplicate assignment at line 510:

                stage(key) {
-                   config.stageName = key
                    try {

554-573: Add validation for file existence.

The function uses readFile without checking if the file exists, which could result in unclear error messages if the properties file is missing.

Add a file existence check:

     def filePath = "jenkins/current_image_tags.properties"
 
+    if (!fileExists(filePath)) {
+        error "Properties file not found: ${filePath}"
+    }
+
     echo "Updating ${filePath} with new image tags"

599-622: Consider more robust Signed-off-by parsing.

The regex pattern /(.*)<(.+)>/ may not handle all valid Signed-off-by formats (e.g., missing angle brackets, extra whitespace). While the error handling provides fallback behavior, more robust parsing or additional logging would improve reliability.

Consider adding validation or logging of the parsed values:

                 def signedEmail = matcher[0][2].trim()
                 // Set git config user.name and user.email to match Signed-off-by for signed commit consistency
                 if (signedName && signedEmail) {
                     echo "Setting git config user.name to '${signedName}' and user.email to '${signedEmail}' for consistency with Signed-off-by"
+                    // Validate email format
+                    if (!signedEmail.contains('@')) {
+                        echo "Warning: parsed email '${signedEmail}' does not appear valid, using defaults"
+                        return
+                    }
                     sh """

629-631: Add retry logic for git push.

The git push operation has no error handling or retry logic. Network issues or transient failures could cause the entire pipeline to fail unnecessarily.

Consider using llmExecStepWithRetry for the push operation, similar to other network operations in the pipeline:

         // Push the changes to the user fork's branch
-        sh """
-        git push fork HEAD:${currentBranch}
-        """
+        def pushScript = """
+        cd ${LLM_ROOT}
+        git push fork HEAD:${currentBranch}
+        """
+        trtllm_utils.llmExecStepWithRetry(this, script: pushScript, numRetries: 3)
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e5384d and 665f7a2.

📒 Files selected for processing (1)
  • jenkins/BuildDockerImage.groovy (8 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Pre-commit Check
🔇 Additional comments (6)
jenkins/BuildDockerImage.groovy (6)

36-37: Hard-coded MODE override bypasses parameter.

Line 37 overrides the MODE parameter with a hard-coded value "build_for_ci", effectively disabling normal mode regardless of the parameter input. The TODO comment suggests this is temporary.

Please confirm when this override should be removed to restore normal parameter-driven behavior.


337-339: LGTM!

The conditional logic correctly tracks CI image tags using the stage name as the key, consistent with the NGC image tracking pattern above.


487-492: LGTM!

The filtering logic correctly restricts build configurations to CI-related entries when in build_for_ci mode, matching the config keys defined earlier.


703-714: LGTM!

The new pipeline stage is correctly structured with an appropriate conditional guard for CI build mode.


716-720: LGTM!

The conditional correctly skips artifact upload when in CI build mode, which is appropriate given that the CI mode has its own output mechanism.


734-734: LGTM!

The additional MODE != "build_for_ci" conditions correctly skip post-build stages (waiting for artifacts, sanity checks, and security registration) that are not applicable to CI image builds.

Also applies to: 795-795, 831-831

@tensorrt-cicd
Copy link
Collaborator

PR_Github #25529 [ run ] triggered by Bot. Commit: 665f7a2

@tensorrt-cicd
Copy link
Collaborator

PR_Github #25529 [ run ] completed with state ABORTED. Commit: 665f7a2

@ZhanruiSunCh
Copy link
Collaborator Author

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

@tensorrt-cicd
Copy link
Collaborator

PR_Github #25543 [ run ] triggered by Bot. Commit: 665f7a2

@tensorrt-cicd
Copy link
Collaborator

PR_Github #25543 [ run ] completed with state ABORTED. Commit: 665f7a2

@tensorrt-cicd
Copy link
Collaborator

PR_Github #5 [ run ] triggered by Bot. Commit: 665f7a2

@tensorrt-cicd
Copy link
Collaborator

PR_Github #5 [ run ] completed with state FAILURE. Commit: 665f7a2
Build Docker Images Pipeline #1209 failed

@zeroepoch
Copy link
Collaborator

@ZhanruiSunCh is this PR meant for review? I see the subject is "Test".

@ZhanruiSunCh ZhanruiSunCh marked this pull request as draft November 27, 2025 07:17
@ZhanruiSunCh
Copy link
Collaborator Author

@ZhanruiSunCh is this PR meant for review? I see the subject is "Test".

Not, Sorry, I forget add Draft for it.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #17 [ run ] triggered by Bot. Commit: 4e8920e

@tensorrt-cicd
Copy link
Collaborator

PR_Github #17 [ run ] completed with state ABORTED. Commit: 4e8920e
LLM/PipelineMonitor/L0_MergeRequest_PR #4 (Blue Ocean) completed with status: ABORTED

@ZhanruiSunCh
Copy link
Collaborator Author

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

@tensorrt-cicd
Copy link
Collaborator

PR_Github #26127 [ run ] triggered by Bot. Commit: 4e8920e

@tensorrt-cicd
Copy link
Collaborator

PR_Github #26127 [ run ] completed with state ABORTED. Commit: 4e8920e
LLM/main/L0_MergeRequest_PR #19843 (Blue Ocean) completed with status: ABORTED

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18 [ run ] triggered by Bot. Commit: 4e8920e

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18 [ run ] completed with state ABORTED. Commit: 4e8920e

@tensorrt-cicd
Copy link
Collaborator

PR_Github #19 [ run ] triggered by Bot. Commit: 4e8920e

@tensorrt-cicd
Copy link
Collaborator

PR_Github #19 [ run ] completed with state FAILURE. Commit: 4e8920e
Build Docker Images Pipeline #5 failed

@tensorrt-cicd
Copy link
Collaborator

PR_Github #20 [ run ] triggered by Bot. Commit: 4e8920e

@tensorrt-cicd
Copy link
Collaborator

PR_Github #20 [ run ] completed with state ABORTED. Commit: 4e8920e

@tensorrt-cicd
Copy link
Collaborator

PR_Github #21 [ run ] triggered by Bot. Commit: 65be40e

@tensorrt-cicd
Copy link
Collaborator

PR_Github #21 [ run ] completed with state FAILURE. Commit: 65be40e
Build Docker Images Pipeline #7 failed

ZhanruiSunCh and others added 24 commits January 8, 2026 11:27
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
Signed-off-by: ZhanruiSunCh <[email protected]>
@ZhanruiSunCh ZhanruiSunCh force-pushed the user/zhanruis/1120_support_build_image_and_test_it branch from 65b8d94 to 3c1b71f Compare January 8, 2026 03:27
@tensorrt-cicd
Copy link
Collaborator

PR_Github #76 [ run ] triggered by Bot. Commit: 3c1b71f

@tensorrt-cicd
Copy link
Collaborator

PR_Github #76 [ run ] completed with state FAILURE. Commit: 3c1b71f
LLM/PipelineMonitor/L0_MergeRequest_PR #64 (Blue Ocean) completed with status: ABORTED

@tensorrt-cicd
Copy link
Collaborator

PR_Github #77 [ run ] triggered by Bot. Commit: 4f485e0

@tensorrt-cicd
Copy link
Collaborator

PR_Github #77 [ run ] completed with state FAILURE. Commit: 4f485e0
Build Docker Images Pipeline #65 failed

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.

3 participants