Repository navigation
feat: add unified RayClusterConfig pydantic v2 model (RHAI-264) - #1146
dora-the-ai-coder wants to merge 4 commits into
Conversation
Defines unified config model merging ClusterConfiguration and ManagedClusterConfig with KubeRay CRD-aligned naming, field validators (memory normalization, RFC 1123 name), and model validators (autoscaling, GCS FT, accelerator lookup, usage stats, TLS warning). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: dora-the-ai-coder <eder.ignatowicz@gmail.com>
Covers autoscaling constraints, GCS fault tolerance, accelerator lookup, Kueue fields (AC2), usage stats env var, TLS warning, type validation, and field parity with ClusterConfiguration and ManagedClusterConfig. Signed-off-by: dora-the-ai-coder <eder.ignatowicz@gmail.com>
Wire up RayClusterConfig in ray/__init__.py, package root __init__.py, public-surface.json, and .importlinter contract 4. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: dora-the-ai-coder <eder.ignatowicz@gmail.com>
- Move RayClusterConfig import to end of ray/__init__.py to follow existing sub-package grouping convention - Use typing.Dict/List instead of built-in generics for consistency with sibling config files (ray/cluster/config.py, ray/rayjobs/config.py) - Add test_name_empty_string_rejected to exercise the empty-string branch in validate_cluster_name Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1146 +/- ##
==========================================
+ Coverage 96.66% 96.79% +0.13%
==========================================
Files 23 24 +1
Lines 2337 2435 +98
==========================================
+ Hits 2259 2357 +98
Misses 78 78 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/hold |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Summary
RayClusterConfigpydantic v2 BaseModel atsrc/codeflare_sdk/ray/config.pythat unifies all parameters fromClusterConfiguration(31 fields) andManagedClusterConfig(21 fields) with KubeRay CRD-aligned naminglocal_queue,priority_class) to first-class model attributesAcceptance Criteria
Review Scores (v2)
*Lint critical is infrastructure-only:
make build-test-imagerequires podman (not installed in CI env). Actualruff checkpasses cleanly. All 42 pytest tests pass.Files Changed
src/codeflare_sdk/ray/config.py— new RayClusterConfig model + DEFAULT_ACCELERATORSsrc/codeflare_sdk/ray/test_config.py— 42 unit tests (13 core + 28 validator/parity)src/codeflare_sdk/ray/__init__.py— re-export RayClusterConfigsrc/codeflare_sdk/__init__.py— top-level exportdocs/api/public-surface.json— new "config" section.importlinter— contract 4 coverage for ray.configScope
This epic covers the model definition only. Spec-building refactoring, integration with
ClusterandRayJob, deprecation shims, and end-to-end validation are handled in subsequent epics (RHAI-265+).Note
Near-miss verdict (8.7/10) due to infrastructure-only lint finding. Human review recommended for the lint dimension — the code itself is clean.