[kubectl-plugin] Use dashboard API instead of the stdout of the ray job submit
CLI to get Job submission ID
#3556
Labels
cli
kubectl plugin
See ray-project/ray#52780 (comment) and ray-project/ray#52780 (comment)
It's fine to wrap the
ray job submit
command, but we should not rely on its stdout. We need to call the dashboard REST API instead.Since we'll only submit one job to one
RayJob
CR, we can use the list job API. It should return only one job. Then we can get the job submission ID from that. Make requests tohttp://localhost:8265/api/jobs/
in the head pod.Note that calling dashboard API should be in a dedicated go routine so that it won't be blocked by the
ray job submit
CLI.Related code snippets:
The text was updated successfully, but these errors were encountered: