KEMBAR78
[TRTLLM-6893][infra] Disable the x86 / SBSA build stage when run BuildDockerImage by ZhanruiSunCh · Pull Request #6729 · NVIDIA/TensorRT-LLM · GitHub
Skip to content

Conversation

@ZhanruiSunCh
Copy link
Collaborator

@ZhanruiSunCh ZhanruiSunCh commented Aug 8, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Improved error handling so build artifact polling and sanity-check stages reliably mark failures and report missing artifacts.
    • Prevented empty auto-trigger tag lists from affecting test job selection.
  • Chores

    • Sanity checks now run only for post-merge workflows; certain platform stages are removed with an informative announcement when building Docker images in pre-merge pipelines.

Description

Test Coverage

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.

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 August 8, 2025 03:46
@ZhanruiSunCh ZhanruiSunCh self-assigned this Aug 8, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 8, 2025

Warning

Rate limit exceeded

@ZhanruiSunCh has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 42 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between a9579e9 and 2eb1c68.

📒 Files selected for processing (3)
  • jenkins/BuildDockerImage.groovy (2 hunks)
  • jenkins/L0_MergeRequest.groovy (2 hunks)
  • jenkins/L0_Test.groovy (1 hunks)
📝 Walkthrough

Walkthrough

Added catchError wrappers around two stages in the Docker image build pipeline, fixed a polling bug in artifact-wait logic, gated sanity-check execution to post-merge jobs, removed specific stages for pre-merge Docker-image runs, and tightened test-job filtering to require a non-empty auto-trigger tag list.

Changes

Cohort / File(s) Change Summary
Build pipeline error handling & polling fix
jenkins/BuildDockerImage.groovy
Wrapped "Wait for Build Jobs Complete" polling and "Sanity Check for NGC Images" downstream-trigger logic in catchError (stageResult/final buildResult = FAILURE). Removed extraneous exitCode handling and moved missing-files check to after per-file loop. Timeout behavior preserved.
Merge-request stage gating & stage removal
jenkins/L0_MergeRequest.groovy
Made runSanityCheck conditional on job name (only enabled for post-merge). When Build-Docker-Images runs in pre-merge, remove x86_64-linux and SBSA-linux from stages and echo an informational message.
Test job auto-trigger filtering
jenkins/L0_Test.groovy
Require AUTO_TRIGGER_TAG_LIST to be present and non-empty (size() > 0) before collecting/adding auto-triggered test stages.

Sequence Diagram(s)

sequenceDiagram
    participant Pipeline as Jenkins Pipeline
    participant ArtifactHost as Remote Artifact Host
    participant SanityJob as BuildDockerImageSanityTest

    Pipeline->>ArtifactHost: Poll for build artifacts (loop)
    alt All artifacts found
        Pipeline->>Pipeline: Log success and continue
    else Missing artifacts / timeout
        Pipeline->>Pipeline: throw error (caught by catchError -> mark stage FAILED)
    end

    Pipeline->>SanityJob: Trigger downstream sanity job (with params)
    SanityJob-->>Pipeline: Return status
    alt Success
        Pipeline->>Pipeline: Continue
    else Failure/Error
        Pipeline->>Pipeline: catchError marks stage FAILED
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • niukuo
  • yiqingy0
  • chzblych
✨ Finishing Touches
🧪 Generate unit tests
  • 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ZhanruiSunCh ZhanruiSunCh requested a review from chzblych August 8, 2025 03:47
@ZhanruiSunCh
Copy link
Collaborator Author

/bot run --stage-list "Build-Docker-Images"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #14553 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #14553 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #10994 (Partly Tested) completed with status: 'FAILURE'

@ZhanruiSunCh ZhanruiSunCh force-pushed the user/zhanruis/0804_disable_build_when_build_docker_image branch from 555216f to a9579e9 Compare August 12, 2025 02:50
@ZhanruiSunCh
Copy link
Collaborator Author

/bot run --stage-list "Build-Docker-Images"

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

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

556-605: Robust, readable artifact polling with clear failure semantics: LGTM with two small nits

The catchError wrapper correctly marks the stage as failed without aborting the whole pipeline, and the missingFiles evaluation is now correct. Two optional refinements:

  • Prefer the Jenkins-native sleep form for clarity.
  • Consider using a timeout block to avoid manual elapsed-time arithmetic.

Apply either or both of these minimal tweaks:

-                                sleep(pollIntervalSeconds)
+                                sleep time: pollIntervalSeconds, unit: 'SECONDS'

Or wrap the polling with timeout:

-                            def startTime = System.currentTimeMillis()
-                            def maxWaitMs = maxWaitMinutes * 60 * 1000
-                            while ((System.currentTimeMillis() - startTime) < maxWaitMs) {
+                            timeout(time: maxWaitMinutes, unit: 'MINUTES') {
+                              while (true) {
                                 def missingFiles = []
                                 ...
-                                if (missingFiles.isEmpty()) {
-                                    echo "All build artifacts are ready!"
-                                    return
-                                }
+                                if (missingFiles.isEmpty()) {
+                                    echo "All build artifacts are ready!"
+                                    return
+                                }
                                 ...
-                                sleep time: pollIntervalSeconds, unit: 'SECONDS'
-                            }
-                            def elapsedMinutes = (System.currentTimeMillis() - startTime) / (60 * 1000)
-                            error "Timeout waiting for build artifacts (${elapsedMinutes.intValue()} minutes)"
+                                sleep time: pollIntervalSeconds, unit: 'SECONDS'
+                              }
+                            }
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 555216f and a9579e9.

📒 Files selected for processing (3)
  • jenkins/BuildDockerImage.groovy (2 hunks)
  • jenkins/L0_MergeRequest.groovy (2 hunks)
  • jenkins/L0_Test.groovy (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • jenkins/L0_Test.groovy
⏰ 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 (2)
jenkins/L0_MergeRequest.groovy (1)

1232-1233: Gate sanity-check to post-merge only: LGTM

Passing runSanityCheck as true only for PostMerge jobs aligns with the goal to skip sanity in pre-merge runs.

jenkins/BuildDockerImage.groovy (1)

617-641: Sanity test stage now consistently marks failures: LGTM

Wrapping the downstream sanity job in catchError ensures stage-level failure is recorded while the pipeline proceeds to post steps. Parameter wiring (globalVars, enableFailFast=false) looks correct.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #14888 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #14888 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #11233 (Partly Tested) completed with status: 'FAILURE'

@ZhanruiSunCh ZhanruiSunCh force-pushed the user/zhanruis/0804_disable_build_when_build_docker_image branch from a9579e9 to 2eb1c68 Compare August 13, 2025 09:43
@ZhanruiSunCh
Copy link
Collaborator Author

/bot run --stage-list "Build-Docker-Images"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15112 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15112 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #11409 (Partly Tested) completed with status: 'FAILURE'

@ZhanruiSunCh
Copy link
Collaborator Author

/bot run

@ZhanruiSunCh ZhanruiSunCh force-pushed the user/zhanruis/0804_disable_build_when_build_docker_image branch from 2eb1c68 to 96130c0 Compare August 14, 2025 09:22
@ZhanruiSunCh
Copy link
Collaborator Author

/bot run --stage-list "Build-Docker-Images"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15282 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15282 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #11537 (Partly Tested) completed with status: 'FAILURE'

@ZhanruiSunCh ZhanruiSunCh force-pushed the user/zhanruis/0804_disable_build_when_build_docker_image branch from 96130c0 to 92b87de Compare August 15, 2025 06:25
@ZhanruiSunCh
Copy link
Collaborator Author

/bot run --stage-list "Build-Docker-Images"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15411 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15411 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #11615 (Partly Tested) completed with status: 'FAILURE'

@ZhanruiSunCh ZhanruiSunCh force-pushed the user/zhanruis/0804_disable_build_when_build_docker_image branch from 92b87de to 517b549 Compare August 20, 2025 05:58
@ZhanruiSunCh
Copy link
Collaborator Author

/bot run --stage-list "Build-Docker-Images"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15870 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15870 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #11929 (Partly Tested) completed with status: 'FAILURE'

@ZhanruiSunCh ZhanruiSunCh force-pushed the user/zhanruis/0804_disable_build_when_build_docker_image branch from a2dde0d to 2124052 Compare September 2, 2025 05:56
ZhanruiSunCh and others added 4 commits September 2, 2025 01:56
…dDockerImage

Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
…TAG_LIST mode is true.

Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
Co-authored-by: Yanchao Lu <yanchaol@nvidia.com>
Signed-off-by: Zhanrui Sun <184402041+ZhanruiSunCh@users.noreply.github.com>
@ZhanruiSunCh ZhanruiSunCh force-pushed the user/zhanruis/0804_disable_build_when_build_docker_image branch from 2124052 to 1d205ef Compare September 2, 2025 08:56
@ZhanruiSunCh
Copy link
Collaborator Author

/bot run --stage-list "Build-Docker-Images"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #17339 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #17339 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #13032 (Partly Tested) completed with status: 'FAILURE'

@ZhanruiSunCh
Copy link
Collaborator Author

/bot skip --comment "only nspect known issue"

@ZhanruiSunCh ZhanruiSunCh enabled auto-merge (squash) September 4, 2025 09:44
@tensorrt-cicd
Copy link
Collaborator

PR_Github #17668 [ skip ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #17668 [ skip ] completed with state SUCCESS
Skipping testing for commit 1d205ef

@ZhanruiSunCh ZhanruiSunCh merged commit 0de3f83 into NVIDIA:main Sep 4, 2025
5 checks passed
greg-kwasniewski1 pushed a commit to nv-auto-deploy/TensorRT-LLM that referenced this pull request Sep 4, 2025
…dDockerImage (NVIDIA#6729)

Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
Signed-off-by: Zhanrui Sun <184402041+ZhanruiSunCh@users.noreply.github.com>
Co-authored-by: Yanchao Lu <yanchaol@nvidia.com>
Wong4j pushed a commit to Wong4j/TensorRT-LLM that referenced this pull request Sep 20, 2025
…dDockerImage (NVIDIA#6729)

Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
Signed-off-by: Zhanrui Sun <184402041+ZhanruiSunCh@users.noreply.github.com>
Co-authored-by: Yanchao Lu <yanchaol@nvidia.com>
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