feat: add unified RayClusterConfig pydantic v2 model (RHAI-264) - #1146
Open
dora-the-ai-coder wants to merge 4 commits into
Open
feat: add unified RayClusterConfig pydantic v2 model (RHAI-264)#1146dora-the-ai-coder wants to merge 4 commits into
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>
Contributor
|
[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:
|
Contributor
|
/hold |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.