[ray]: use clusterSelector when address is provided for long-lived clusters#8
Open
jld-adriano wants to merge 1 commit intomasterfrom
Open
[ray]: use clusterSelector when address is provided for long-lived clusters#8jld-adriano wants to merge 1 commit intomasterfrom
jld-adriano wants to merge 1 commit intomasterfrom
Conversation
…d clusters
When the address field is set in RayJobConfig, the flytepropeller ray plugin
now uses ClusterSelector mode instead of creating a new RayCluster. This enables
long-lived Ray clusters for faster iteration during development.
The address is parsed to extract a cluster name:
- Cluster name: 'my-cluster' -> clusterSelector: {'ray.io/cluster': 'my-cluster'}
- Head service DNS: 'my-cluster-head-svc' -> clusterSelector: {'ray.io/cluster': 'my-cluster'}
- Ray client URL: 'ray://my-cluster-head-svc:10001' -> clusterSelector: {'ray.io/cluster': 'my-cluster'}
Changes:
- Add address field to flyteidl ray.proto (field 6)
- Add parseAddressToClusterName function to extract cluster name from address
- Update constructRayJob to use ClusterSelector when address is set
- Add unit tests for address parsing and cluster selector mode
Author: Devin AI (claude-sonnet-4-20250514)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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
When the
addressfield is set in RayJobConfig, flytepropeller now uses KubeRay'sClusterSelectormode instead of creating a new RayCluster. This enables long-lived Ray clusters for faster iteration during development.The address is parsed to extract a cluster name:
my-cluster→{"ray.io/cluster": "my-cluster"}my-cluster-head-svc→{"ray.io/cluster": "my-cluster"}ray://my-cluster-head-svc:10001→{"ray.io/cluster": "my-cluster"}Note: This PR requires a companion flytekit-ray PR to serialize the
addressfield to flyteidl. Also requiresmake generateto regenerate protobuf code before compiling.Review & Testing Checklist for Human
address- users who set it expecting onlyray.init()behavior will now get cluster selector mode. Verify this is the intended behavior and consider if migration guidance is needed.ray.io/clusteris the correct KubeRay label for cluster selection (check existing RayClusters on heph)parseAddressToClusterNamefor edge cases - IPv6, unusual DNS names, addresses that don't follow expected patternsmake generateto regenerate protobuf code and verify it compilesaddressset to verify no new cluster is createdNotes
Companion PR needed: flytekit-ray changes to serialize
addressfield to flyteidlLink to Devin run: https://app.devin.ai/sessions/91929162dbc241d8a83ef3c18aeb9aba
Requested by: adriano@exa.ai (@jld-adriano)