[Feature][history server] support endpoint /timezone#4510
Open
CheyuWu wants to merge 4 commits intoray-project:masterfrom
Open
[Feature][history server] support endpoint /timezone#4510CheyuWu wants to merge 4 commits intoray-project:masterfrom
CheyuWu wants to merge 4 commits intoray-project:masterfrom
Conversation
historyserver/pkg/collector/logcollector/runtime/logcollector/collector.go
Outdated
Show resolved
Hide resolved
historyserver/pkg/collector/logcollector/runtime/logcollector/collector.go
Outdated
Show resolved
Hide resolved
historyserver/pkg/collector/logcollector/runtime/logcollector/collector.go
Outdated
Show resolved
Hide resolved
historyserver/pkg/collector/logcollector/runtime/logcollector/collector.go
Outdated
Show resolved
Hide resolved
63769e2 to
cf06745
Compare
Collaborator
Author
Signed-off-by: Cheyu Wu <cheyu1220@gmail.com>
Signed-off-by: Cheyu Wu <cheyu1220@gmail.com>
cf06745 to
6551317
Compare
Signed-off-by: Cheyu Wu <cheyu1220@gmail.com>
Collaborator
Author
|
Hi @Future-Outlier, I have address the problem you have mentioned, and rewrite the code PTAL |
| storageKey := utils.EndpointPathToStorageKey(timezoneEndpoint) | ||
| objectKey := path.Join( | ||
| r.ClusterDir, | ||
| path.Base(sessionID), |
Contributor
There was a problem hiding this comment.
Suggested change
| path.Base(sessionID), | |
| sessionID, |
do we really need path.Base here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
we need to support something like this for dead cluster using golang.
https://github.com/ray-project/ray/blob/9cbcdb468904f8aa8122b817be216e0da237c086/python/ray/dashboard/timezone_utils.py#L1-L56
Summary
This PR adds timezone metadata collection and API support to the KubeRay history server, enabling proper timestamp interpretation for historical Ray cluster sessions.
Changes Overview
Commit 1: Collector-side timezone metadata collection (5f7600f)
Added timezone information collection in the log collector component:
Data Structure
timezoneInfostruct with two fields:Offset: UTC offset string (e.g., "+08:00")Value: IANA timezone name (e.g., "Asia/Shanghai")Timezone Detection Strategy
GET {DashboardAddress}/timezone)Storage
{clusterDir}/{session}/fetched_endpoints/restful__timezonefollowing the same storage path convention asFetchAndStoreClusterMetadataprocessSessionLatestLogsprocessSessionPrevLogsWatchSessionLatestLoopsTesting
Added unit tests including:
Commit 2: History server API endpoint (6551317)
Exposed timezone metadata through a REST API:
New Endpoint:
GET /timezone{"offset":"","value":""}if metadata file doesn't existImplementation
{clusterNameID}/{sessionName}/fetched_endpoints/restful__timezoneManual Testing
Follow the instruction to create the live cluster
https://github.com/ray-project/kuberay/blob/master/historyserver/docs/set_up_historyserver.md
Get live cluster timezone
File in MinIO
Get Dead cluster timezone
Delete the raycluster
$ kubectl delete -f historyserver/config/raycluster.yamlClean the cookies
$ rm ~/cookies.txtRead dead cluster
Get cookies
Get dead cluster timezone
Log in historyserver
Related issue number
Closes #4503
Checks