PG1204 opened a new issue, #5919:
URL: https://github.com/apache/texera/issues/5919

   ### Task Summary
   
   Formalize `WorkflowStatusService`'s two existing concerns, operator 
**state** and operator **statistics**, as cleanly separated sub-concepts, 
rather than bundling them in a single `OperatorStatistics` object.
   
   ### Context
   
   `WorkflowStatusService` currently carries two distinct concepts in one 
shape: `OperatorStatistics` mixes `operatorState` together with the 
per-operator statistics (row counts, sizes, timing). The RFC discussion (#5216) 
noted these are really separate sub-concepts and should be formalized as such 
before/ alongside layering performance metrics on top.
   
   This was raised during review of #5834 (which introduced performance metrics 
as a cleanly separated concept). To keep that PR scoped to capturing metrics, 
and to avoid adding API with no consumer yet and the state/statistics 
separation was deferred and agreed to be handled as a dedicated PR.
   
   Before:  OperatorStatistics { operatorState, ...statistics }   // two 
concepts, one blob
   After:   state       -> Record<string, OperatorState>
   statistics  -> Record<string, OperatorStatistics>      // statistics only
   performance -> Record<string, OperatorPerformanceMetrics>   // already 
separate
   
   ### Proposed Change
   
   In `frontend/src/app/workspace/service/workflow-status/`:
   
   - Split the `state` concept out of `OperatorStatistics` so the statistics 
type holds metrics only, and expose operator state as its own concept on 
`WorkflowStatusService` (e.g. a dedicated state stream + snapshot).
   - Keep the existing public API working (or migrate consumers) so the change 
is behavior-preserving; update call sites that currently read `operatorState` 
off the combined object.
   - Performance metrics (`OperatorPerformanceMetrics`) remain the separate 
third concept introduced in #<pr1>.
   
   The exact API shape (separate streams vs. a structured container) to be 
settled in the PR; the goal is three clearly separated concepts: state, 
statistics, performance.
   
   ### Required Test
   
   - Characterization tests first to pin current behavior (this is a refactor 
with no behavior change), then update the affected specs.
   - `WorkflowStatusService` spec: assert state and statistics are exposed and 
update independently; existing consumer specs stay green.
   
   ### Related
   
   - Umbrella issue #5772
   - Follow-up from #5834 (review discussion)
   - RFC discussion #5216
   
   ### Task Type
   
   - [x] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [ ] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [ ] Other


-- 
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