-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Convert job_manager to be async #27123
Conversation
Updates jobs api Updates snapshot api Updates state api Increases jobs api version to 2 Signed-off-by: Alan Guo <[email protected]>
nice! I will review this today |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks for the quick followup!
if not self._job_info_client: | ||
self._job_info_client = JobInfoStorageClient( | ||
self._dashboard_head.gcs_aio_client | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we lazily construct this? add comment for future reader
dashboard/modules/version.py
Outdated
# Version 1 -> 2: - Renamed job_id to submission_id. | ||
# - Changed list_jobs sdk/cli/api to return a list | ||
# instead of a dictionary. | ||
CURRENT_VERSION = "2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this intended? or an artifact of stacked PRs? please make this a separate PR either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intended but yes, an orthogonal change. Will separate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. LGTM to merge after this is resolved.
Signed-off-by: Alan Guo <[email protected]>
Signed-off-by: Alan Guo <[email protected]>
Signed-off-by: Alan Guo <[email protected]>
I will take a look at the PR tomorrow (please ping me if I dont') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment to handle... Other things LGTM.
self.JOB_DATA_KEY.format(job_id=job_id), | ||
async def put_info(self, job_id: str, data: JobInfo): | ||
await self._gcs_aio_client.internal_kv_put( | ||
self.JOB_DATA_KEY.format(job_id=job_id).encode(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, do you know what happens if you don't specify encode
? Does it just fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Little concerned the original _internal_kv_put
has a runtime type conversion & checking, but it doesn't I know this PR handles that correctly, but just in case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, without encode, there is an error that gets thrown.
Signed-off-by: Alan Guo <[email protected]>
return { | ||
job_id: job_info | ||
for job_id, job_info in await asyncio.gather( | ||
*[get_job_info(job_id) for job_id in job_ids] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, this is not a blocker for the PR. But I wonder @iycheng do we have APIs to get a list of entities from the internal kv?
Signed-off-by: Alan Guo <[email protected]>
@rkooo567 @architkulkarni @edoakes , please merge! |
Updates jobs api Updates snapshot api Updates state api Increases jobs api version to 2 Signed-off-by: Alan Guo [email protected] Why are these changes needed? follow-up for #25902 (comment)
Updates jobs api Updates snapshot api Updates state api Increases jobs api version to 2 Signed-off-by: Alan Guo [email protected] Why are these changes needed? follow-up for #25902 (comment)
Updates jobs api Updates snapshot api Updates state api Increases jobs api version to 2 Signed-off-by: Alan Guo [email protected] Why are these changes needed? follow-up for ray-project#25902 (comment) Signed-off-by: Stefan van der Kleij <[email protected]>
Updates jobs api
Updates snapshot api
Updates state api
Increases jobs api version to 2
Signed-off-by: Alan Guo [email protected]
Why are these changes needed?
follow-up for #25902 (comment)
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.