Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid setup-dev.py writing to generated/ #51194

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevin85421
Copy link
Member

@kevin85421 kevin85421 commented Mar 9, 2025

Why are these changes needed?

docker build --progress=plain --build-arg BUILD_DATE="$(date +%Y-%m-%d:%H:%M:%S)" -t $RAY_IMAGE -f ./python/ray/tests/kuberay/Dockerfile . || exit
image

#48793 assumes that the ray/serve/generated directory does not exist in the Ray directory, which means that users have not compiled Ray in that directory.

However, this approach is incorrect for developers who want to test code changes in KubeRay. The workflow is like:

  • Develop Ray locally, meaning you continuously update the code and compile it as needed. The directory ray/serve/generated should be created after compilation.
  • After finishing development, the developer wants to build a Docker image using this Dockerfile and then test it with KubeRay. The Dockerfile copies the local Ray directory into the image and runs python3 setup-dev.py -y to replace the Ray package with your local Ray code.
  • Preserve ray/serve/generated when creating softlink for serve package #48793 will move the existing .../site-packages/ray/serve/generated directory to a temporary directory, and then move it back after the soft link is created. However, in this case, ray/serve/generated directory has already existed.

In addition, in the Dockerfile, the ray directory is added by the command ADD . ray, so the owner is root instead of ray. That's why we see the permission error above.

image

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: kaihsun <[email protected]>
@kevin85421 kevin85421 changed the title Fix setup-dev.py to write to generated/ Avoid setup-dev.py writing to generated/ Mar 9, 2025
@@ -6,7 +6,7 @@ kind delete cluster
docker image rm $RAY_IMAGE

pushd ../../../..
docker build --build-arg BUILD_DATE="$(date +%Y-%m-%d:%H:%M:%S)" -t $RAY_IMAGE -f ./python/ray/tests/kuberay/Dockerfile . || exit
docker build --progress=plain --build-arg BUILD_DATE="$(date +%Y-%m-%d:%H:%M:%S)" -t $RAY_IMAGE -f ./python/ray/tests/kuberay/Dockerfile . || exit
Copy link
Member Author

Choose a reason for hiding this comment

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

For observability, this is to print the output of each step.

@kevin85421 kevin85421 added the go add ONLY when ready to merge, run all tests label Mar 9, 2025
@kevin85421 kevin85421 marked this pull request as ready for review March 9, 2025 17:42
@kevin85421
Copy link
Member Author

cc @rueian @ryanaoleary this is for autoscaler development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant