Skip to content

refactor(amber, frontend): remove the never-emitted CacheStatusUpdateEvent - #8690

Open
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:refactor/cache-status-event
Open

aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:refactor/cache-status-event

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

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

…Event

Nothing has constructed CacheStatusUpdateEvent since apache#3111 deleted the
EditingTimeCompilationRequest branch of WorkflowWebsocketResource, its
only sender. Drop the case class, its @JsonSubTypes registration and
spec entries, the frontend interface and type-map entry, and the
OperatorReuseCacheStatusService handler that subscribed to it (plus
its two tests and the WorkflowWebsocketService dependency it alone
used). The service's live reuse-cache repaint subscription stays.
Copilot AI lite review requested due to automatic review settings September 26, 2026 08:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added engine refactor Refactor the code frontend Changes related to the frontend GUI labels Sep 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @Xiao-zhen-Liu, @benjaminle22, @Ma77Ball
    You can notify them by mentioning @Xiao-zhen-Liu, @benjaminle22, @Ma77Ball in a comment.

@github-actions

Copy link
Copy Markdown
Contributor

✅ No material benchmark regressions detected

🟢 6 better · 🔴 0 worse · ⚪ 9 noise (<±5%) · 0 without baseline

Compared against main 33bd07b benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🟢 bs=10 sw=10 sl=64 424 0.259 23,091/28,194/28,194 us 🟢 -34.4% / 🔴 +75.3%
🟢 bs=100 sw=10 sl=64 876 0.535 114,179/126,747/126,747 us 🟢 -12.6% / 🔴 +13.0%
⚪ bs=1000 sw=10 sl=64 1,012 0.618 981,461/1,038,945/1,038,945 us ⚪ within ±5% / 🟢 -5.8%
Baseline details

Latest main 33bd07b from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 424 tuples/sec 397 tuples/sec 736.99 tuples/sec +6.8% -42.5%
bs=10 sw=10 sl=64 MB/s 0.259 MB/s 0.242 MB/s 0.45 MB/s +7.0% -42.4%
bs=10 sw=10 sl=64 p50 23,091 us 23,837 us 13,174 us -3.1% +75.3%
bs=10 sw=10 sl=64 p95 28,194 us 42,993 us 16,900 us -34.4% +66.8%
bs=10 sw=10 sl=64 p99 28,194 us 42,993 us 19,889 us -34.4% +41.8%
bs=100 sw=10 sl=64 throughput 876 tuples/sec 894 tuples/sec 946.47 tuples/sec -2.0% -7.4%
bs=100 sw=10 sl=64 MB/s 0.535 MB/s 0.546 MB/s 0.578 MB/s -2.0% -7.4%
bs=100 sw=10 sl=64 p50 114,179 us 108,953 us 105,257 us +4.8% +8.5%
bs=100 sw=10 sl=64 p95 126,747 us 145,004 us 112,150 us -12.6% +13.0%
bs=100 sw=10 sl=64 p99 126,747 us 145,004 us 125,962 us -12.6% +0.6%
bs=1000 sw=10 sl=64 throughput 1,012 tuples/sec 1,016 tuples/sec 973.64 tuples/sec -0.4% +3.9%
bs=1000 sw=10 sl=64 MB/s 0.618 MB/s 0.62 MB/s 0.594 MB/s -0.3% +4.0%
bs=1000 sw=10 sl=64 p50 981,461 us 978,935 us 1,032,217 us +0.3% -4.9%
bs=1000 sw=10 sl=64 p95 1,038,945 us 1,029,563 us 1,072,497 us +0.9% -3.1%
bs=1000 sw=10 sl=64 p99 1,038,945 us 1,029,563 us 1,102,623 us +0.9% -5.8%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,471.41,200,128000,424,0.259,23091.20,28194.27,28194.27
1,100,10,64,20,2283.12,2000,1280000,876,0.535,114178.93,126747.43,126747.43
2,1000,10,64,20,19753.59,20000,12800000,1012,0.618,981461.48,1038944.56,1038944.56

@codecov-commenter

codecov-commenter commented Sep 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.72%. Comparing base (33bd07b) to head (8e291ba).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8690      +/-   ##
============================================
- Coverage     92.72%   92.72%   -0.01%     
+ Complexity     4947     4946       -1     
============================================
  Files          1243     1242       -1     
  Lines         52682    52672      -10     
  Branches       6520     6519       -1     
============================================
- Hits          48850    48840      -10     
  Misses         2214     2214              
  Partials       1618     1618              
Flag Coverage Δ *Carryforward flag
access-control-service 77.38% <ø> (ø) Carriedforward from 33bd07b
agent-service 99.16% <ø> (ø) Carriedforward from 33bd07b
amber 88.46% <ø> (+<0.01%) ⬆️
computing-unit-managing-service 60.41% <ø> (ø) Carriedforward from 33bd07b
config-service 87.37% <ø> (ø) Carriedforward from 33bd07b
file-service 81.53% <ø> (ø) Carriedforward from 33bd07b
frontend 96.52% <100.00%> (-0.01%) ⬇️
notebook-migration-service 83.73% <ø> (ø) Carriedforward from 33bd07b
pyamber 98.56% <ø> (ø) Carriedforward from 33bd07b
workflow-compiling-service 74.09% <ø> (ø) Carriedforward from 33bd07b

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aglinxinyuan
aglinxinyuan requested a review from kunwp1 September 26, 2026 08:25

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine frontend Changes related to the frontend GUI refactor Refactor the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the never-emitted CacheStatusUpdateEvent

3 participants