PG1204 opened a new pull request, #8301:
URL: https://github.com/apache/texera/pull/8301

   ### What changes were proposed in this PR?
   
   `WorkflowStatusService` currently bundles two different concepts in one 
object: `OperatorStatistics` carries both the operator's execution **state** 
(Running, Completed, …) and its **statistics** (row counts, sizes, timing). 
This PR splits them into separate sub-concepts, so the service now exposes 
three cleanly separated things: state, statistics, and performance metrics (the 
third was already separate, from #5834).
   
   - `WorkflowStatusService` now has a stream + snapshot pair per concept: 
`getStateUpdateStream()` / `getCurrentState()` for state, and 
`getStatisticsUpdateStream()` / `getCurrentStatistics()` for statistics 
(metrics only). The performance-metrics API is unchanged.
   - `OperatorStatistics` no longer contains `operatorState`. The combined 
shape the engine still sends over the websocket is typed as 
`OperatorRuntimeStatus`, and the service splits each update into the two maps. 
No backend or wire-format changes.
   - All consumers are migrated: components that only cared about state (result 
panel, code debugger, UDF debug service, property editor) now read the state 
stream; the workflow editor renders state (operator color) and statistics (port 
counts, worker count) from their own streams. 
`JointUIService.changeOperatorStatistics` renders statistics only — state 
rendering stays in `changeOperatorState` (its two long-unused 
`isSource`/`isSink` params are dropped along the way).
   - A small `WorkflowGraph.getAllOperatorIDs()` accessor keeps the per-update 
rendering path from materializing full operator predicates when only IDs are 
needed.
   
   The change is behavior-preserving. One deliberate exception: the old code 
applied the "Recovering" display state by mutating the shared emitted map, 
which leaked masked states to other subscribers depending on subscription 
order. That accident is removed, and the override is now applied explicitly 
where state is rendered.
   
   Rebased on top of the merged heat-map overlay (#6213), which consumes only 
the unchanged performance-metrics stream; its editor wiring is untouched by 
this refactor.
   
   ### Any related issues, documentation, discussions?
   
   Closes #5919. Part of umbrella #5772. Follow-up from the review discussion 
in #5834; follows RFC discussion #5216.
   
   ### How was this PR tested?
   
   The `WorkflowStatusService` spec now asserts state and statistics are 
exposed and update independently, and that statistics never leak 
`operatorState`. Consumer specs were updated to the new API, plus new tests for 
the state-rendering rules in the workflow editor (Uninitialized fallback, 
Recovering override, state label restored after navigation).
   
   Full frontend suite passes (5,350 tests, 209 files); `tsc --noEmit`, `eslint 
./src`, and Prettier are all clean.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   This PR was co-authored using Claude in compliance with ASF.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to