-
Notifications
You must be signed in to change notification settings - Fork 698
Open
Description
kuberay/historyserver/pkg/historyserver/router.go
Lines 656 to 685 in a9a4ab0
| // TODO(Han-Ju Chen): This function has a bug - using JobID instead of actual lineage. | |
| // Real lineage requires: | |
| // 1. Add ParentTaskID field to Task struct (types/task.go) | |
| // 2. Parse parent_task_id from Ray events (eventserver.go) | |
| // 3. Build task tree structure based on ParentTaskID | |
| // 4. Update rayjob example to generate nested tasks for testing | |
| func summarizeTasksByLineage(tasks []eventtypes.Task) map[string]interface{} { | |
| summary := make(map[string]map[string]int) | |
| for _, task := range tasks { | |
| // Use JobID as a simple lineage grouping for now | |
| lineageKey := task.JobID | |
| if lineageKey == "" { | |
| lineageKey = "unknown" | |
| } | |
| if _, ok := summary[lineageKey]; !ok { | |
| summary[lineageKey] = make(map[string]int) | |
| } | |
| state := string(task.State) | |
| if state == "" { | |
| state = "UNKNOWN" | |
| } | |
| summary[lineageKey][state]++ | |
| } | |
| return map[string]interface{}{ | |
| "summary": summary, | |
| "total": len(tasks), | |
| } | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels