Skip to content

[TRTLLMINF-357][infra] Consolidate runBranchesWithInfraDefer into shared lib - #18385

Draft
brnguyen2 wants to merge 2 commits into
NVIDIA:mainfrom
brnguyen2:user/brnguyen/TRTLLMINF-357-consolidate-infradefer
Draft

[TRTLLMINF-357][infra] Consolidate runBranchesWithInfraDefer into shared lib#18385
brnguyen2 wants to merge 2 commits into
NVIDIA:mainfrom
brnguyen2:user/brnguyen/TRTLLMINF-357-consolidate-infradefer

Conversation

@brnguyen2

Copy link
Copy Markdown
Collaborator

Description

Both jenkins/L0_Test.groovy and jenkins/Build.groovy carried near-identical inline copies of the infra-scoped fail-fast helper runBranchesWithInfraDefer (added by TRTLLMINF-311 at the test layer and TRTLLMINF-324 at the build layer; the Build copy was inline only because the original lived in the L0_Test script's own scope, with a TODO(TRTLLMINF-324) to de-duplicate).

This PR removes both inline copies and calls the new shared helper trtllm_utils.runBranchesWithInfraDefer, which owns the parallel / failFast / UNSTABLE orchestration.

Jira: TRTLLMINF-357.

Changes

  • jenkins/Build.groovy — delete the inline runBranchesWithInfraDefer; the stage("Build") call now uses the shared helper with a K8s-only deferral closure (build pods are K8s builders).
  • jenkins/L0_Test.groovy — delete the inline runBranchesWithInfraDefer; add a small infraDeferPredicate(stageScopes) builder (K8S for every stage, plus SLURM for SLURM-dispatcher stages) and route all four call sites through the shared helper.

Scope policy stays in each caller via an injected isDeferrableInfra(e, stageName) closure. This is required, not just stylistic: trtllm.FailureClassifier / trtllm.exceptions.InfraFailure cannot be imported into vars/trtllm_utils.groovy without breaking its loadScript unit tests (the test classpath has no src/trtllm), and it puts the K8s-vs-SLURM decision where the per-stage scope is known.

Behavior

Unchanged. Still gated on ENABLE_INFRA_SCOPED_FAILFAST (flag off = plain failFast + parallel, exactly as before). Only the helper's home moves.

Dependency / merge order

Requires the paired shared-lib change on trtllm-jenkins-shared-lib@main (adds trtllm_utils.runBranchesWithInfraDefer + InfraDeferTest): MR ftp/infra/trtllm-jenkins-shared-lib!104. Both pipelines pin trtllm-jenkins-shared-lib@main, so this PR must merge after !104 lands on main. Kept as draft until then. Live-pipeline validation of the pair can be done by temporarily repointing the @Library ref to the shared-lib branch.

Test Coverage

The shared helper is unit-tested in the paired shared-lib MR (loadScript + PipelineStub: disabled pass-through, infra-defer + UNSTABLE, genuine-failure rethrow, interrupt-never-swallowed, all-branches outage warning). This PR is a pure Jenkins-pipeline refactor validated by pipeline runs.

PR Checklist

  • PR description clearly explains what and why.
  • PR follows the coding guidelines.

…red lib

Both jenkins/L0_Test.groovy and jenkins/Build.groovy carried near-identical
inline copies of the infra-scoped fail-fast helper (added by TRTLLMINF-311 and
TRTLLMINF-324). Replace both with calls to the new shared
trtllm_utils.runBranchesWithInfraDefer, which owns the parallel/failFast/UNSTABLE
orchestration.

Scope policy stays in each caller via an injected isDeferrableInfra(e, stageName)
closure, since trtllm.FailureClassifier / InfraFailure cannot be imported into
vars/trtllm_utils.groovy without breaking its loadScript unit tests:
- Build.groovy: K8s-only (build pods are K8s builders).
- L0_Test.groovy: infraDeferPredicate() checks K8S for every stage and SLURM in
  addition for SLURM-dispatcher stages, preserving the prior per-stage behavior.

Behavior is unchanged; still gated on ENABLE_INFRA_SCOPED_FAILFAST. Requires the
paired shared-lib change (trtllm_utils.runBranchesWithInfraDefer) on
trtllm-jenkins-shared-lib@main.

Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
Throwaway commit to validate PR NVIDIA#18385 against the paired shared-lib branch
(trtllm-jenkins-shared-lib@user/brnguyen/TRTLLMINF-357-shared-infradefer, MR !104)
before it merges to main. MUST be reverted before this PR merges -- the merged
version references trtllm-jenkins-shared-lib@main.

Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
@brnguyen2

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #70046 [ run ] triggered by Bot. Commit: 153498d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #70046 [ run ] completed with state SUCCESS. Commit: 153498d
/LLM/main/L0_MergeRequest_PR pipeline #57320 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

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.

2 participants