Skip to content

Conversation

@kevin85421
Copy link
Member

Why are these changes needed?

Currently, some tests create docker containers to communicate with Kubernetes via a NodePort service. It is complex and unstable. Hence, this PR executes commands in the head Pod via kubectl exec instead of creating a docker container. See #764 for more details.

Related issue number

Part of #764

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

@kevin85421 kevin85421 marked this pull request as ready for review December 14, 2022 08:52
Copy link
Collaborator

@DmitriGekhtman DmitriGekhtman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the NodePort setup from these tests is a good idea.
We should make a note (issue) to have a dedicate test of Ray client, though.

Using a ClusterIP service and port-forwarding works reliably in the Ray CI, see
https://github.com/ray-project/ray/blob/d2e1ed6e70bfcf6ca355c1d0afbffe355b498405/python/ray/tests/kuberay/test_autoscaling_e2e.py#L329-L332

cc @wilsonwang371

@DmitriGekhtman DmitriGekhtman merged commit 21eb773 into ray-project:master Dec 14, 2022
@wilsonwang371
Copy link
Contributor

I remember @brucez-anyscale mentioned before that port-forwarding in kind might fail.

@DmitriGekhtman
Copy link
Collaborator

Perhaps it depends on the particular setup, but I have never seen Ray client port-forwarding fail in the Ray CI -- the particular test I've linked passes very consistently.

@wilsonwang371
Copy link
Contributor

I pingged Bruce offline and see if he can make some comments here later. @brucez-anyscale

@kevin85421
Copy link
Member Author

kevin85421 commented Dec 14, 2022

Removing the NodePort setup from these tests is a good idea. We should make a note (issue) to have a dedicate test of Ray client, though.

Using a ClusterIP service and port-forwarding works reliably in the Ray CI, see https://github.com/ray-project/ray/blob/d2e1ed6e70bfcf6ca355c1d0afbffe355b498405/python/ray/tests/kuberay/test_autoscaling_e2e.py#L329-L332

QQ: why do we need to use port-forwarding when we have ClusterIP? In my understanding, we can create a Pod to communicate with the head Pod via ClusterIP directly.

@DmitriGekhtman
Copy link
Collaborator

DmitriGekhtman commented Dec 14, 2022

QQ: why do we need to use port-forwarding when we have ClusterIP? In my understanding, we can create a Pod to communicate with the head Pod via ClusterIP directly.

That would work fine as well.

lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
Use kubectl exec in place of complicated NodePort setup in BasicRayTestCase.
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.

3 participants