-
Notifications
You must be signed in to change notification settings - Fork 392
feat(frontend): enhance dashboard UI and fix Ray runner state reporting #6063
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
base: main
Are you sure you want to change the base?
Conversation
Greptile SummaryThis PR implements a comprehensive dashboard feature for monitoring Daft query execution across both Ray (Flotilla) and Native (Swordfish) runners. The implementation adds real-time tracking of query lifecycle events, operator-level statistics, and a web-based frontend for visualization. Key Changes:
Issues Found:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Runner as Ray/Native Runner
participant Context as DaftContext
participant DashSub as DashboardSubscriber
participant Engine as Dashboard Engine
participant Frontend as Dashboard Frontend
User->>Runner: df.collect()
Runner->>Context: notify_query_start(query_id, metadata)
Context->>DashSub: on_query_start()
DashSub->>Engine: POST /engine/query/{id}/start
Engine->>Frontend: Broadcast query summary
Runner->>Context: notify_optimization_start(query_id)
Context->>DashSub: on_optimization_start()
DashSub->>Engine: POST /engine/query/{id}/plan_start
Runner->>Context: notify_optimization_end(query_id, plan)
Context->>DashSub: on_optimization_end()
DashSub->>Engine: POST /engine/query/{id}/plan_end
Runner->>Context: notify_exec_start(query_id, physical_plan)
Context->>DashSub: on_exec_start()
DashSub->>Engine: POST /engine/query/{id}/exec/start
loop During Execution
Runner->>Context: notify_exec_operator_start(node_id)
Context->>DashSub: on_exec_operator_start()
DashSub->>Engine: POST /engine/query/{id}/exec/{op_id}/start
Runner->>Context: notify_exec_emit_stats(stats)
Context->>DashSub: on_exec_emit_stats()
DashSub->>Engine: POST /engine/query/{id}/exec/emit_stats
Engine->>Frontend: Update operator stats
Runner->>Context: notify_exec_operator_end(node_id)
Context->>DashSub: on_exec_operator_end()
DashSub->>Engine: POST /engine/query/{id}/exec/{op_id}/end
end
Runner->>Context: notify_exec_end(query_id)
Context->>DashSub: on_exec_end()
DashSub->>Engine: POST /engine/query/{id}/exec/end
Runner->>Context: notify_query_end(query_id, result)
Context->>DashSub: on_query_end()
DashSub->>Engine: POST /engine/query/{id}/end
Engine->>Frontend: Broadcast final status
Frontend-->>User: Display query results
|
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.
33 files reviewed, 1 comment
| let mut accumulated = self.operator_stats.lock().unwrap(); | ||
| let mut started = self.started_operators.lock().unwrap(); |
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.
logic: Acquire started lock before accumulated for consistency
Lines 54 and 64-65 acquire these same two locks but in different order. Line 54 acquires only started, while lines 64-65 acquire accumulated first then started. Use consistent lock ordering to prevent potential deadlock.
| let mut accumulated = self.operator_stats.lock().unwrap(); | |
| let mut started = self.started_operators.lock().unwrap(); | |
| let mut started = self.started_operators.lock().unwrap(); | |
| let mut accumulated = self.operator_stats.lock().unwrap(); |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/daft-distributed/src/python/dashboard.rs
Line: 64:65
Comment:
**logic:** Acquire `started` lock before `accumulated` for consistency
Lines 54 and 64-65 acquire these same two locks but in different order. Line 54 acquires only `started`, while lines 64-65 acquire `accumulated` first then `started`. Use consistent lock ordering to prevent potential deadlock.
```suggestion
let mut started = self.started_operators.lock().unwrap();
let mut accumulated = self.operator_stats.lock().unwrap();
```
How can I resolve this? If you propose a fix, please make it concise.54363ea to
bdaf3a1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6063 +/- ##
==========================================
+ Coverage 72.80% 72.90% +0.10%
==========================================
Files 971 973 +2
Lines 127119 126166 -953
==========================================
- Hits 92545 91982 -563
+ Misses 34574 34184 -390 🚀 New features to boost your workflow:
|
|
@Jay-ju, for UI changes, I usually suggest adding some before/after screenshots. It makes it a lot easier and faster for reviewers. Thanks! |
|
Before:
@universalmind303 I have added the comparison charts before and after. The back-end PR corresponding to this front-end is #6062 cc @srilman As per your request, I have split #6008 into two parts: the front-end and back-end implementations. |
|
@universalmind303 Are there any other issues with this pr? |





Changes Made
Related Issues