aglinxinyuan opened a new pull request, #8690:
URL: https://github.com/apache/texera/pull/8690
### What changes were proposed in this PR?
Deletes `CacheStatusUpdateEvent`. It is a websocket event the backend has
not sent since the websocket cache check was removed, while the frontend kept a
subscription to it. There is no behaviour change: **+3/−87 lines**.
Backend: the case class, its `@JsonSubTypes` registration, and its entries
in `TexeraWebSocketEventSpec`.
Frontend: the interface and `TexeraWebsocketEventTypeMap` entry, and the
`subscribeToEvent("CacheStatusUpdateEvent")` handler in
`OperatorReuseCacheStatusService` with its two tests. The service's
`WorkflowWebsocketService` dependency is removed too, because that handler was
its only use.
### History
| | |
| --- | --- |
| **Introduced by** | #1328 (2021-09-08), "[Operator Caching Step 3] add
operator cache backend new files and config changes". The frontend handler came
in #1327 the day before |
| **Usage removed by** | #3111 (2024-11-26), "Update amber to depend on sub
projects". It deleted the `EditingTimeCompilationRequest` branch of
`WorkflowWebsocketResource`, the only place that called
`sessionState.send(CacheStatusUpdateEvent(...))` |
It has been dead for nearly two years. The frontend handler has been
subscribed to an event that never arrives.
> Reviewer note: the reuse-cache marker is unaffected.
`OperatorReuseCacheStatusService` still repaints it through its other, live
subscription (`getReuseCacheOperatorsChangedStream`).
`OperatorResultCacheStatus` and `JointUIService.changeOperatorReuseCacheStatus`
stay because that path and the editor still use them.
### Any related issues, documentation, discussions?
Closes #8689
### How was this PR tested?
No new tests. The protocol spec now covers only the types that remain
registered, and the service spec drops the two cases for the removed handler.
Locally, from the repo root with Java 17:
- `sbt "WorkflowExecutionService/Test/compile"`: success.
- `sbt "WorkflowExecutionService/testOnly *TexeraWebSocketEventSpec"`: 10
tests, all pass.
- `sbt "WorkflowExecutionService/scalafmtCheckAll"
"WorkflowExecutionService/scalafixAll --check"`: clean.
From `frontend/`:
- `npx ng test --watch=false
--include='**/operator-reuse-cache-status.service.spec.ts'
--include='**/workflow-websocket.service.spec.ts'`: 18 tests, all pass.
- `yarn format:ci`: clean.
- `npx ng build`: success.
To re-check:
```
git grep -n CacheStatusUpdateEvent # no hits
```
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5.5)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]