[TRTLLMINF-237][infra] Re-home L0_Test SLURM finalizer - #17263
[TRTLLMINF-237][infra] Re-home L0_Test SLURM finalizer#17263dpitman-nvda wants to merge 3 commits into
Conversation
…sourceLedger Replace the inlined per-stage slurmResourceRegistry and its finalize/sweep helpers with the shared trtllm-jenkins-shared-lib resourceLedger, and delegate dispatcher- pod-death detection to trtllm.ContextDeath. Behavior-preserving refactor; all registerSlurmResource/deregisterSlurmResource/isDispatcherPodFailure/ finalizeOrphanedSlurmResource/sweepOrphanedSlurmResources call sites are unchanged (only the function bodies are re-homed). - State now lives in resourceLedger. Each SLURM stage registers two sibling ids: "<stage>/dispatcher-pod" (pod spec) and "<stage>/slurm" (per-attempt job/node). Keying them separately replaces the old merged-entry + partial-deregister (keep-podSpec) special case: markReclaimed drops only the job/node entry and leaves the pod spec a later attempt's off-pod reconciliation needs. - reconcileSlurmResource is the reclaim body for both the in-catch finalize (selective reconcile of "<stage>/slurm") and the post-build sweep (selective reconcile of entries with a live job/node), returning true to deregister and false/leave-live on failure. The pod spec + container come from the sibling dispatcher-pod entry; the in-catch caller may override the pod spec. - isDispatcherPodFailure now delegates to ContextDeath.isContextDeath (same patterns, plus recursive suppressed-cause traversal from the shared class). - The ledger enforces CPS-safety on stored fields; the pod spec is a plain map of strings, so registration is unaffected. Validated: Groovy AST parse of the modified file succeeds. Signed-off-by: Derek Pitman <dpitman@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe Jenkins pipeline classifies dispatcher-pod failures with ChangesSLURM resource ledger reconciliation
Estimated code review effort: 4 (Complex) | ~45 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant Pipeline
participant resourceLedger
participant DispatcherPod
participant SlurmCluster
Pipeline->>resourceLedger: Register dispatcher-pod and SLURM entries
DispatcherPod-->>Pipeline: Report ContextDeath failure
Pipeline->>resourceLedger: Read sibling pod entry
Pipeline->>SlurmCluster: Clean reconstructed orphaned resources
Pipeline->>resourceLedger: Sweep remaining live SLURM entries
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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 864-871: In the dispatcher-pod reconciliation method containing
the try/catch around attemptPodSpec, declare def attemptPodSpec = null before
the try block, then assign the computed pod specification inside try. Ensure the
catch block can access that variable when calling reconciliation, while
preserving the existing finalizeOrphanedSlurmResource flow.
🪄 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: e0f84327-e144-4274-bfdb-ae433d97f3fe
📒 Files selected for processing (1)
jenkins/L0_Test.groovy
… catch can see it CodeRabbit (critical): in the singleAttempt branch of runKubernetesPodWithInfraRetry, attemptPodSpec was declared with `def` inside the try block but referenced in the catch block when reconciling a dispatcher-pod death (finalizeOrphanedSlurmResource(pipeline, stageName, attemptPodSpec)). Groovy block-scopes a try-local `def`, so the catch reference resolved as an undefined property and threw MissingPropertyException on exactly the SLURM off-pod reconciliation path -- masking the real failure and skipping cleanup. Declare `def attemptPodSpec = null` above the try and assign it inside, so the catch sees the failing attempt's pod spec. Pre-existing since the SLURM finalizer landed (PR NVIDIA#16446); surfaced on this re-home because it lives in the same reconciliation path. Validated: Groovy AST parse of the modified file succeeds. Signed-off-by: Derek Pitman <dpitman@nvidia.com>
|
/bot run --disable-fail-fast |
|
PR_Github #63836 [ run ] triggered by Bot. Commit: |
|
PR_Github #63836 [ run ] completed with state
|
|
Could you address two points before merge?
The split ledger entries otherwise make the cleanup state clearer. |
…ger contract
Address review (BowenFu):
- Scope reconciliation to this subsystem's entries. The resourceLedger is shared
build-wide, so filtering only by jobUID/nodeName could pass a future non-SLURM
entry to reconcileSlurmResource. sweepOrphanedSlurmResources now selects on
type in ('slurmJob','slurmNode') as well as a live job/node, and
reconcileSlurmResource early-returns false (leave untouched) for any non-SLURM
entry a selector might pass in.
- Document the shared-library contract used here for equivalence with the
replaced inlined finalizer: the ContextDeath.isContextDeath pattern set and the
register/markReclaimed/get/reconcile behavior, in the finalizer comment block,
and note that isDispatcherPodFailure now delegates to ContextDeath.
Validated: Groovy AST parse of the modified file succeeds.
Signed-off-by: Derek Pitman <dpitman@nvidia.com>
Done. Selector now requires those typed entries and a live jobUID/nodeName. Also added a guard to
Updated the comments to explain the pattern set and semantics. |
|
/bot run --disable-fail-fast |
|
PR_Github #64106 [ run ] triggered by Bot. Commit: |
|
PR_Github #64106 [ run ] completed with state
|
Dev Engineer Review
slurmResourceRegistryflow with sharedresourceLedgerintegration.slurmJobandslurmNodeentries.trtllm.ContextDeath.attemptPodSpecfor failure reconciliation.ContextDeath.isContextDeathpatterns and the shared ledgerregister,markReclaimed,get, andreconcilecontract.resourceLedgerAPI usage, CPS safety, reconciliation idempotency, and best-effort error handling.QA Engineer Review
No test changes.
Description
Replace the inlined per-stage slurmResourceRegistry and its finalize/sweep helpers with the shared trtllm-jenkins-shared-lib resourceLedger, and delegate dispatcher- pod-death detection to trtllm.ContextDeath. Behavior-preserving refactor; all registerSlurmResource/deregisterSlurmResource/isDispatcherPodFailure/ finalizeOrphanedSlurmResource/sweepOrphanedSlurmResources call sites are unchanged (only the function bodies are re-homed).
Test Coverage
N/A, this is a CI change
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-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin 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.