[ray]: use clusterSelector when address is provided for long-lived clusters #8
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: [email protected] (@jld-adriano)