chore(amber): remove the fully commented-out PythonWorkflowWorkerSpec - #7447
chore(amber): remove the fully commented-out PythonWorkflowWorkerSpec#7447aglinxinyuan wants to merge 1 commit into
Conversation
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🟢 | bs=10 sw=10 sl=64 | 392 | 0.239 | 24,448/31,108/31,108 us | 🟢 -16.9% / 🔴 +93.0% |
| 🔴 | bs=100 sw=10 sl=64 | 783 | 0.478 | 127,726/167,705/167,705 us | 🔴 +14.7% / 🔴 +50.8% |
| 🔴 | bs=1000 sw=10 sl=64 | 913 | 0.557 | 1,083,465/1,227,930/1,227,930 us | 🔴 +6.3% / 🔴 +15.5% |
Baseline details
Latest main e03d971 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 392 tuples/sec | 397 tuples/sec | 752.25 tuples/sec | -1.3% | -47.9% |
| bs=10 sw=10 sl=64 | MB/s | 0.239 MB/s | 0.242 MB/s | 0.459 MB/s | -1.2% | -47.9% |
| bs=10 sw=10 sl=64 | p50 | 24,448 us | 25,048 us | 13,006 us | -2.4% | +88.0% |
| bs=10 sw=10 sl=64 | p95 | 31,108 us | 37,437 us | 16,117 us | -16.9% | +93.0% |
| bs=10 sw=10 sl=64 | p99 | 31,108 us | 37,437 us | 19,286 us | -16.9% | +61.3% |
| bs=100 sw=10 sl=64 | throughput | 783 tuples/sec | 811 tuples/sec | 953.66 tuples/sec | -3.5% | -17.9% |
| bs=100 sw=10 sl=64 | MB/s | 0.478 MB/s | 0.495 MB/s | 0.582 MB/s | -3.4% | -17.9% |
| bs=100 sw=10 sl=64 | p50 | 127,726 us | 120,719 us | 105,130 us | +5.8% | +21.5% |
| bs=100 sw=10 sl=64 | p95 | 167,705 us | 146,162 us | 111,226 us | +14.7% | +50.8% |
| bs=100 sw=10 sl=64 | p99 | 167,705 us | 146,162 us | 121,065 us | +14.7% | +38.5% |
| bs=1000 sw=10 sl=64 | throughput | 913 tuples/sec | 920 tuples/sec | 984.25 tuples/sec | -0.8% | -7.2% |
| bs=1000 sw=10 sl=64 | MB/s | 0.557 MB/s | 0.562 MB/s | 0.601 MB/s | -0.9% | -7.3% |
| bs=1000 sw=10 sl=64 | p50 | 1,083,465 us | 1,083,686 us | 1,024,295 us | -0.0% | +5.8% |
| bs=1000 sw=10 sl=64 | p95 | 1,227,930 us | 1,155,247 us | 1,062,710 us | +6.3% | +15.5% |
| bs=1000 sw=10 sl=64 | p99 | 1,227,930 us | 1,155,247 us | 1,095,400 us | +6.3% | +12.1% |
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,509.72,200,128000,392,0.239,24447.65,31108.41,31108.41
1,100,10,64,20,2554.35,2000,1280000,783,0.478,127725.66,167705.21,167705.21
2,1000,10,64,20,21911.25,20000,12800000,913,0.557,1083464.54,1227930.46,1227930.46
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7447 +/- ##
============================================
- Coverage 85.32% 85.32% -0.01%
+ Complexity 4151 4150 -1
============================================
Files 1169 1169
Lines 46740 46740
Branches 5202 5202
============================================
- Hits 39882 39881 -1
Misses 5148 5148
- Partials 1710 1711 +1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
9289ebe to
d053b25
Compare
|
instead of removing it, can we add some unit tests? I know there are e2e tests already but good to guard the behavior with unit tests. |
|
Good point — opened #7488, which replaces this file with real unit tests instead of only deleting it: |
…onworker proxy unit tests (apache#7488) ### What changes were proposed in this PR? apache#7447 proposed deleting `PythonWorkflowWorkerSpec.scala`, which has been fully commented out for years and no longer compiles against today's APIs. Following the review feedback there (apache#7447 (comment)), this PR replaces the dead file with real unit tests instead of only deleting it. The commented-out spec drove `PythonWorkflowWorker` end-to-end, which needs a live Python process — that path is covered by the e2e tests. What can be unit-tested without Python is the JVM side of the JVM↔Python Arrow Flight bridge, which had no coverage until now: ``` JVM Python ┌───────────────────────────────────────┐ │ PythonWorkflowWorker (actor) │ e2e-tested only (needs Python) │ ├─ PythonProxyClient ──── Flight ────┼────▶ network_receiver.py │ │ PythonProxyClientSpec: fake │ │ │ Python Flight server in Scala │ │ └─ PythonProxyServer ◀─── Flight ────┼───── network_sender.py │ PythonProxyServerSpec: test │ │ plays the Python Flight client │ └───────────────────────────────────────┘ ``` | New spec | Subject | Behavior pinned down | |---|---|---| | `PythonProxyServerSpec` | `PythonProxyServer` / `AmberProducer` | `handshake` completes the port promise and replies `ok`; `control` actions route `ControlInvocation` / `ReturnInvocation` to the output gateway on the control channel and ack with a little-endian credit value; `Data` / `State` / `ECM` puts are reassembled into `DataFrame` / `StateFrame` (loop envelope preserved) / `EmbeddedControlMessage` and acked with credits | | `PythonProxyClientSpec` | `PythonProxyClient` | heartbeat handshake happens before the queue is drained; queued `ControlInvocation` / `ReturnInvocation` / actor commands arrive as `control` / `actor` actions with intact protobuf payloads; `DataFrame` / `StateFrame` / ECM puts arrive under the right `PythonDataHeader` with tuples, loop envelope, and bytes intact; queue-size acks update `getQueuedCredit`; connection retries abort with `WorkflowRuntimeException` (no server listening, non-`ack` heartbeat); `close()` before any connection does not throw | Both specs stand in for the Python worker with plain Arrow Flight components (`FlightClient` / `NoOpFlightProducer`), so no Python process is involved. Together with the existing `WorkerBatchInternalQueueSpec` and `PythonWorkflowWorkerStartupConfigSpec`, every class in the `pythonworker` package except the actor itself now has unit coverage. The commented-out `PythonWorkflowWorkerSpec.scala` is removed, superseded by these tests. ### Any related issues, documentation, discussions? Supersedes apache#7447. ### How was this PR tested? This PR is tests-only. Both new specs pass locally: ``` sbt "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.architecture.pythonworker.PythonProxyServerSpec org.apache.texera.amber.engine.architecture.pythonworker.PythonProxyClientSpec" ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Fable 5)
What changes were proposed in this PR?
Deletes
PythonWorkflowWorkerSpec.scala, which contributes zero test suites — all 201 lines are commented out, including thepackagedeclaration, so it compiles to a licence header. −201 lines, no behaviour change.The commented body targets APIs deleted long ago —
InitializeOperatorLogicHandler,UpdateInputLinkingHandler,OpenOperator,engine.common.Constants, the oldPhysicalLinkshape — so it cannot be un-commented as-is; reviving these tests would mean rewriting them against the current engine.Any related issues, documentation, discussions?
Closes #7445
How was this PR tested?
Existing tests only — this PR removes a file that contains no runnable test.
Locally, from the repo root with Java 17:
sbt "WorkflowExecutionService/Test/compile"— success.Verification, re-runnable by a reviewer:
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5)