[cuebot] Reject job specs referencing undefined limits - #2514
[cuebot] Reject job specs referencing undefined limits#2514DiegoTavares wants to merge 1 commit into
Conversation
A job spec that referenced a limit which had never been created failed deep inside createJob with a raw EmptyResultDataAccessException. On the async launchSpec path the RPC returned success and the failure was only reported by email, while launchSpecAndWait surfaced a misleading "Incorrect result size: expected 1, actual 0". Validate limits in JobLauncher.verifyJobSpec instead, so both launch paths reject the spec before any job is created and the error names every missing limit along with the layers using it. JobManagerService keeps a fail-closed guard for direct createJob callers and for limits deleted between verification and insert. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013vjCKwvKgD59YNdHnj25nA Entire-Checkpoint: 550498d6ea46
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe change adds a missing-limit lookup through the DAO and admin service layers. Job launch validation now reports undefined limits and their referencing layers. Direct job creation rejects missing limits before linking layer limits. ChangesLimit validation
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The change rejects job specs with undefined limits before job creation and preserves a fail-closed guard for direct or concurrent callers; no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant JobLauncher
participant AdminManagerService
participant LimitDaoJdbc
participant limit_record
JobLauncher->>AdminManagerService: findMissingLimitNames(limit names)
AdminManagerService->>LimitDaoJdbc: findMissingLimitNames(limit names)
LimitDaoJdbc->>limit_record: query existing limit names
limit_record-->>LimitDaoJdbc: matching names
LimitDaoJdbc-->>AdminManagerService: missing names
AdminManagerService-->>JobLauncher: missing names
JobLauncher-->>JobLauncher: reject spec with referencing layers
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
A job spec that referenced a limit which had never been created failed deep inside createJob with a raw EmptyResultDataAccessException. On the async launchSpec path the RPC returned success and the failure was only reported by email, while launchSpecAndWait surfaced a misleading "Incorrect result size: expected 1, actual 0".
Validate limits in JobLauncher.verifyJobSpec instead, so both launch paths reject the spec before any job is created and the error names every missing limit along with the layers using it. JobManagerService keeps a fail-closed guard for direct createJob callers and for limits deleted between verification and insert.
Summary by CodeRabbit