feat(scheduler): make node lock timeout configurable #1117
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.60) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 222 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.323
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #1117"
general
weight: 0.35
wawa0210
Summary
This PR makes the HAMi scheduler's node lock timeout configurable, allowing operators to adjust the timeout duration based on their cluster characteristics and scheduling requirements.
Changes Made
1. __Configuration Layer (
pkg/scheduler/config/config.go)__- Added
NodeLockTimeout intconfiguration parameter- Default value set to 1 minute to maintain backward compatibility
2. __Command Line Interface (
cmd/scheduler/main.go)__- Added
--node-lock-timeoutflag to scheduler command line options- Flag accepts timeout value in minutes
- Integrated timeout initialization in the
start()function3. __Runtime Behavior (
pkg/util/nodelock/nodelock.go)__- The global
NodeLockTimeoutvariable is now set from configuration- Maintains existing lock/unlock logic and timeout checking mechanism
Motivation
Previously, the node lock timeout was hardcoded to 1 minute. In some cluster environments, this timeout may be too long, causing unnecessary delays in scheduling operations. By making this configurable, operators can:
Backward Compatibility
Default timeout is 5 minute
Custom set 30s
Custom set 2mins