Skip to content

refactor(amber): rename Controller to Coordinator#6124

Open
Yicong-Huang wants to merge 1 commit into
apache:mainfrom
Yicong-Huang:refactor/controller-to-coordinator
Open

refactor(amber): rename Controller to Coordinator#6124
Yicong-Huang wants to merge 1 commit into
apache:mainfrom
Yicong-Huang:refactor/controller-to-coordinator

Conversation

@Yicong-Huang

@Yicong-Huang Yicong-Huang commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Renames the Amber master actor from Controller to Coordinator across the whole engine — classes, variables, comments, protobuf, and tests:

Area Change
Scala package architecture.controllerarchitecture.coordinator (dirs moved with git mv)
Scala classes ControllerCoordinator, ControllerProcessorCoordinatorProcessor, ControllerConfigCoordinatorConfig, ControllerAsyncRPCHandlerInitializer, ControllerTimerService, ControllerSpecCoordinator*
gRPC proto controllerservice.protocoordinatorservice.proto; service ControllerServiceCoordinatorService; rpc ControllerInitiateQueryStatisticsCoordinatorInitiateQueryStatistics; scalapb extends option and proto comments
Python runtime controller_interface / _controller_service_stub / controller_stubcoordinator_*; generated betterproto bindings are gitignored and regenerate from the renamed proto (bin/python-proto-gen.sh verified)
Actor identity CONTROLLER ActorVirtualIdentity constant → COORDINATOR (Scala + Python)
Location preference PreferControllerPreferCoordinator (workflow-core)
Variables / comments all camelCase & snake_case variants (controllerConfig, controllerTimerService, controllerAddress, …) and prose in scaladoc/docstrings

The rename is purely mechanical (case-preserving substring replacement, verified exhaustively): grep -ri controller over amber/ and common/ returns zero matches afterwards. Untouched on purpose: Angular's HttpTestingController, the Web AbortController in agent-service, and Envoy's gatewayclass-controller in the k8s templates.

Follows #6123 (merged), which freed the Coordinator name by renaming the region-scheduling coordinators to managers.

Any related issues, documentation, discussions?

Closes #6122.

How was this PR tested?

Refactor with no behavior change — existing tests stay green with no assertion edits:

sbt "WorkflowCore/testOnly org.apache.texera.amber.core.workflow.WorkflowCoreTypesSpec org.apache.texera.amber.core.workflow.PhysicalOpSpec org.apache.texera.amber.util.VirtualIdentityUtilsSpec"
sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.SpecialPhysicalOpFactorySpec"
sbt "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.architecture.coordinator.CoordinatorSpec org.apache.texera.amber.engine.architecture.coordinator.ClientEventSpec org.apache.texera.amber.engine.architecture.coordinator.WorkflowSchedulerSpec org.apache.texera.amber.engine.architecture.scheduling.WorkflowExecutionManagerSpec org.apache.texera.amber.engine.architecture.scheduling.RegionExecutionManagerSpec"
cd amber && python -m pytest src/test/python/core/architecture/rpc/test_async_rpc_client.py src/test/python/core/util/test_virtual_identity.py src/test/python/core/runnables/test_console_message.py src/test/python/core/runnables/test_data_processor.py src/test/python/core/runnables/test_main_loop.py src/test/python/pytexera/storage/test_large_binary_manager.py

Full Test/compile of WorkflowCore, WorkflowOperator, and WorkflowExecutionService passes; Python bindings regenerated via bin/python-proto-gen.sh and 68 pytest cases pass.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Fable 5)

@github-actions

github-actions Bot commented Jul 5, 2026

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: @aglinxinyuan, @Ma77Ball, @kunwp1
    You can notify them by mentioning @aglinxinyuan, @Ma77Ball, @kunwp1 in a comment.

@codecov-commenter

codecov-commenter commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.21277% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.15%. Comparing base (3084881) to head (63ef84c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../engine/architecture/coordinator/Coordinator.scala 66.66% 6 Missing and 1 partial ⚠️
...exera/amber/engine/common/client/ClientActor.scala 66.66% 1 Missing and 2 partials ⚠️
.../texera/web/service/WorkflowExecutionService.scala 25.00% 3 Missing ⚠️
...rg/apache/texera/web/service/WorkflowService.scala 0.00% 3 Missing ⚠️
...ber/engine/architecture/worker/DataProcessor.scala 66.66% 2 Missing ⚠️
amber/src/main/python/core/runnables/main_loop.py 80.00% 1 Missing ⚠️
...hitecture/common/PekkoActorRefMappingService.scala 0.00% 0 Missing and 1 partial ⚠️
...inator/CoordinatorAsyncRPCHandlerInitializer.scala 50.00% 0 Missing and 1 partial ⚠️
...promisehandlers/RetrieveWorkflowStateHandler.scala 0.00% 1 Missing ⚠️
...dinator/promisehandlers/RetryWorkflowHandler.scala 0.00% 1 Missing ⚠️
... and 5 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6124      +/-   ##
============================================
+ Coverage     59.14%   59.15%   +0.01%     
- Complexity     3201     3207       +6     
============================================
  Files          1132     1132              
  Lines         43681    43681              
  Branches       4734     4734              
============================================
+ Hits          25833    25838       +5     
+ Misses        16416    16407       -9     
- Partials       1432     1436       +4     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø)
agent-service 44.59% <ø> (ø) Carriedforward from 3084881
amber 63.16% <67.85%> (+0.04%) ⬆️
computing-unit-managing-service 0.00% <ø> (ø)
config-service 52.30% <ø> (ø)
file-service 62.81% <ø> (ø)
frontend 51.37% <ø> (ø) Carriedforward from 3084881
notebook-migration-service 78.57% <ø> (ø)
pyamber 91.14% <90.00%> (-0.05%) ⬇️
workflow-compiling-service 55.14% <ø> (ø)

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

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

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

Compared against main 3a12e62 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 368 0.224 26,885/32,284/32,284 us 🔴 +13.0% / 🔴 +113.2%
🔴 bs=100 sw=10 sl=64 769 0.469 130,745/153,998/153,998 us 🔴 +10.8% / 🔴 +42.7%
bs=1000 sw=10 sl=64 896 0.547 1,114,774/1,152,459/1,152,459 us ⚪ within ±5% / 🔴 +12.6%
Baseline details

Latest main 3a12e62 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 368 tuples/sec 401 tuples/sec 776.36 tuples/sec -8.2% -52.6%
bs=10 sw=10 sl=64 MB/s 0.224 MB/s 0.245 MB/s 0.474 MB/s -8.6% -52.7%
bs=10 sw=10 sl=64 p50 26,885 us 23,782 us 12,636 us +13.0% +112.8%
bs=10 sw=10 sl=64 p95 32,284 us 35,710 us 15,143 us -9.6% +113.2%
bs=10 sw=10 sl=64 p99 32,284 us 35,710 us 18,954 us -9.6% +70.3%
bs=100 sw=10 sl=64 throughput 769 tuples/sec 809 tuples/sec 985.33 tuples/sec -4.9% -22.0%
bs=100 sw=10 sl=64 MB/s 0.469 MB/s 0.494 MB/s 0.601 MB/s -5.1% -22.0%
bs=100 sw=10 sl=64 p50 130,745 us 123,461 us 101,671 us +5.9% +28.6%
bs=100 sw=10 sl=64 p95 153,998 us 138,992 us 107,939 us +10.8% +42.7%
bs=100 sw=10 sl=64 p99 153,998 us 138,992 us 113,798 us +10.8% +35.3%
bs=1000 sw=10 sl=64 throughput 896 tuples/sec 911 tuples/sec 1,016 tuples/sec -1.6% -11.8%
bs=1000 sw=10 sl=64 MB/s 0.547 MB/s 0.556 MB/s 0.62 MB/s -1.6% -11.8%
bs=1000 sw=10 sl=64 p50 1,114,774 us 1,091,741 us 989,693 us +2.1% +12.6%
bs=1000 sw=10 sl=64 p95 1,152,459 us 1,144,658 us 1,028,327 us +0.7% +12.1%
bs=1000 sw=10 sl=64 p99 1,152,459 us 1,144,658 us 1,059,969 us +0.7% +8.7%
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,544.12,200,128000,368,0.224,26885.04,32284.48,32284.48
1,100,10,64,20,2601.08,2000,1280000,769,0.469,130744.76,153998.48,153998.48
2,1000,10,64,20,22330.96,20000,12800000,896,0.547,1114773.91,1152459.44,1152459.44

@Yicong-Huang Yicong-Huang force-pushed the refactor/controller-to-coordinator branch 2 times, most recently from 743ac96 to 47154ff Compare July 5, 2026 01:33
@Yicong-Huang Yicong-Huang marked this pull request as ready for review July 5, 2026 01:33
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename the Controller actor to Coordinator across the engine

2 participants