Skip to content

Conversation

owenowenisme
Copy link
Contributor

@owenowenisme owenowenisme commented Aug 13, 2025

Why are these changes needed?

Closes #2537


This PR builds on @rueian’s work in PR #2587, with several improvements and refactoring. Many thanks to @rueian for the original contribution!

  1. Minimized Docker Image Size (from 54.4MB to 9.7MB, ~82% reduction):
  • Defined the ‎RayJobRequest type directly in the submitter code, avoiding the need to import the entire ray utils package. Note: If the type changes, updates will be required in two places.
  • Added ‎-ldflags="-w -s" to the build process to further optimize binary size.
❯ docker images
REPOSITORY                        TAG                         IMAGE ID       CREATED          SIZE
kuberay/submitter                 nightly-remove-import-ray   9e304545645e   4 seconds ago    9.7MB
kuberay/submitter                 nightly-import-ray          9b5000dc48cb   18 hours ago     54.4MB
  1. E2E Tests for Submitter
  • Added two end-to-end tests: one for a successful job and one for a failed job, using the lightweight submitter. These tests validate submitter functionality. I did not port all RayJob E2E tests, as those are specific to RayJob and do not impact the submitter.
  1. KubeRay CI & Image Release
  • Integrated E2E tests into the CI pipeline; all tests pass.
  • Further validation is needed for the image release workflow.
  1. Sample yaml for rayJob submitter
  • Created a sample yaml to indicate usage. Can be used with:
kubectl apply -f ray-operator/config/samples/ray-job.light-weight-submitter.yaml

Image Release Validation

To validate my changes in release image workflow, I ran the workflow on my local repo. And since I don't have quay account, I modified the image registry to ghcr on my local repo for testing purpose. (But this PR still uses quay)

I created a tag named v0.0.0-test-submitter-ci and manually run the build and release submitter image on it.
Workflow ran successfully and you can see that the image has been pushed to ghcr with multi-arch.
https://github.com/owenowenisme/kuberay/actions/runs/17117052455/job/48550113929

image

https://github.com/owenowenisme/kuberay/pkgs/container/submitter
image

image

Related issue number

Checks

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

@owenowenisme owenowenisme force-pushed the light-weight-submitter branch from 9806077 to c4e0317 Compare August 14, 2025 04:54
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
@owenowenisme owenowenisme force-pushed the light-weight-submitter branch from 903ad31 to ba022a0 Compare August 15, 2025 02:29
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
@owenowenisme owenowenisme force-pushed the light-weight-submitter branch from 6e62858 to 1f25222 Compare August 15, 2025 12:47
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
@owenowenisme owenowenisme marked this pull request as ready for review August 16, 2025 00:53
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
@owenowenisme owenowenisme force-pushed the light-weight-submitter branch from 0f1a128 to ed7a9b9 Compare August 16, 2025 00:53
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
@owenowenisme
Copy link
Contributor Author

@Future-Outlier @rueian @kevin85421 PTAL🙏

Copy link
Contributor

@fscnick fscnick left a comment

Choose a reason for hiding this comment

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

Would it be better to have an individual directory out of ray-operator? It seems the submitter's code doesn't rely on the ray-operator.

Co-authored-by: fscnick <6858627+fscnick@users.noreply.github.com>
Signed-off-by: Owen Lin (You-Cheng Lin) <106612301+owenowenisme@users.noreply.github.com>
@owenowenisme
Copy link
Contributor Author

owenowenisme commented Aug 17, 2025

Would it be better to have an individual directory out of ray-operator? It seems the submitter's code doesn't rely on the ray-operator.

I have no strong opinion for this cc @rueian @Future-Outlier @kevin85421 WDYT?

Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
@owenowenisme owenowenisme force-pushed the light-weight-submitter branch from e9eb9f5 to a4f8ec5 Compare September 8, 2025 13:06
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
Copy link
Member

@Future-Outlier Future-Outlier left a comment

Choose a reason for hiding this comment

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

Overall LGTM, thank you for the hard work!

@owenowenisme owenowenisme force-pushed the light-weight-submitter branch 2 times, most recently from abdddc6 to 67ec8b5 Compare September 9, 2025 10:46
Signed-off-by: You-Cheng Lin (Owen) <mses010108@gmail.com>
@owenowenisme owenowenisme force-pushed the light-weight-submitter branch from 67ec8b5 to 75eba73 Compare September 9, 2025 12:21
…ttpclient.go

Signed-off-by: Rueian <rueiancsie@gmail.com>
restartPolicy: Never
containers:
- name: my-custom-rayjob-submitter
image: kuberay/submitter:nightly
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that we'll need to change image here once the light-weight submitter image is released

Signed-off-by: Future-Outlier <eric901201@gmail.com>
@Future-Outlier Future-Outlier merged commit bd33d54 into ray-project:master Sep 10, 2025
24 of 27 checks passed
@ronaldo-valente-sgpiu
Copy link

@owenowenisme is this image published on hub.docker.com? or another CR?

@owenowenisme
Copy link
Contributor Author

owenowenisme commented Sep 10, 2025

Hi, @ronaldo-valente-sgpiu, it will be released along with KubeRay 1.15.0 .
If you need the light-weight submitter now, you can build the image by running IMG=your-image-name make docker-image-rayjob-submitter in ray-operator directory.

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.

[Feature] Light-weight job submitter
7 participants