feat: job scheduling priority via setting and per-rule resource#43
Conversation
Add an optional --aws-batch-scheduling-priority workflow-level setting and a per-rule aws_batch_scheduling_priority resource that overrides it, both mapped to submit_job's schedulingPriorityOverride. The value is coerced to an integer and validated to the AWS Batch [0, 9999] range, with errors naming the source (resource vs setting). When neither is set the kwarg is omitted entirely, so submissions on non-fair-share queues are unchanged. Only meaningful on fair-share queues (those with a scheduling policy attached).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR adds AWS Batch scheduling priority support for fair-share queues. The feature introduces optional workflow-level and per-rule scheduling priority configuration with validation, resource-level precedence, and comprehensive test coverage ensuring correct behavior and error handling. ChangesAWS Batch Scheduling Priority for Fair-Share Queues
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@cademirch this should be ready for your review if you have time. |
Adds optional AWS Batch fair-share scheduling priority support at two levels, mapped to
submit_job'sschedulingPriorityOverride:--aws-batch-scheduling-priority— a workflow-level default applied to every job.aws_batch_scheduling_priorityresource — a per-rule override that takes precedence over the setting (mirrors thebatch_queue/aws_batch_task_timeoutper-rule pattern).The value is coerced to an integer and validated to the AWS Batch
[0, 9999]range, with errors naming the source (resource vs setting). When neither is set,schedulingPriorityOverrideis omitted entirely — submissions on non-fair-share queues are byte-identical to before. Only meaningful on fair-share queues (those with a scheduling policy attached); AWS ignores it otherwise.Documented under a new "Scheduling Priority (Fair-Share Queues)" section in
docs/further.md.Testing
New
TestSubmitSchedulingPrioritycovers unset-omits-kwarg, setting-only, resource-overrides-setting, resource-alone, non-numeric (resource + setting), out-of-range (resource + setting), negative (lower bound), and the0and9999boundaries. Full suite: 72 unit tests pass; black + flake8 clean.Summary by CodeRabbit
New Features
Documentation