Skip to content

Conversation

@jld-adriano
Copy link

Summary

When the address field is set in RayJobConfig, flytepropeller now uses KubeRay's 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:

  • 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 address field to flyteidl. Also requires make generate to regenerate protobuf code before compiling.

Review & Testing Checklist for Human

  • Breaking change verification: This changes the semantics of address - users who set it expecting only ray.init() behavior will now get cluster selector mode. Verify this is the intended behavior and consider if migration guidance is needed.
  • Label convention: Verify ray.io/cluster is the correct KubeRay label for cluster selection (check existing RayClusters on heph)
  • Address parsing edge cases: Review parseAddressToClusterName for edge cases - IPv6, unusual DNS names, addresses that don't follow expected patterns
  • Run make generate to regenerate protobuf code and verify it compiles
  • E2E test: After merging companion flytekit PR, test by creating a RayCluster manually, then running a Flyte task with address set to verify no new cluster is created

Notes

Companion PR needed: flytekit-ray changes to serialize address field to flyteidl

Link to Devin run: https://app.devin.ai/sessions/91929162dbc241d8a83ef3c18aeb9aba
Requested by: [email protected] (@jld-adriano)

…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-integration
Copy link

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants