Repository navigation
Commit b6a855a
authored
chore(amber): remove the unused ClosureRequest from ClientActor (apache#7781)
### What changes were proposed in this PR?
Deletes `ClientActor.ClosureRequest` and its unreachable `receive` arm.
Pure deletion, no behaviour change: **−27 lines**.
`AmberClient` is the only thing that messages `ClientActor`, and it
sends exactly two things — `PoisonPill` on shutdown and `CommandRequest`
for RPC calls. A repo-wide search for `ClosureRequest` returns only the
companion-object declaration, the import pulling it into `ClientActor`,
its `receive` arm, and two tests. Nothing sends it, so the arm never
runs:
```scala
case ClosureRequest(closure) => // unreachable
try sender() ! closure()
catch { case e: Throwable => sender() ! e }
```
It was a run-arbitrary-closure-on-the-actor-thread escape hatch that the
engine no longer uses.
> Reviewer note: the spec's header comment explaining why it lives in
`...engine.common.client` — the members are `private[client]`, so no
other package could construct the actor — is kept and reworded to drop
the `ClosureRequest` mention, since the rationale still holds for
`ClientActor` itself. That is the one added line in this diff.
`InitializeRequest`, `CommandRequest` and `ObservableRequest` are
untouched.
### Any related issues, documentation, discussions?
Closes apache#7779
### How was this PR tested?
Existing tests only — this PR adds none, since it removes code and the
tests that covered it.
Locally, from the repo root with Java 17:
- `sbt "WorkflowExecutionService/Test/compile"` — success.
- `sbt "WorkflowExecutionService/testOnly *ClientActorSpec"` — 4 tests,
all pass.
- `sbt scalafmtCheckAll "scalafixAll --check"` — clean (this PR edits
surviving files, so the unused-import gate matters).
Verification, re-runnable by a reviewer:
```
git grep -n ClosureRequest # only the deleted declaration, arm, import and tests
git grep -n 'clientActor !' # AmberClient sends only PoisonPill and CommandRequest
```
> CI note: build jobs may fail repo-wide at workflow startup while the
injected `carabiner-dev/actions/install/ampel` action is off the ASF
allowlist — `main` fails identically. Same class as apache#6989 and apache#7572,
unrelated to this change.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5)1 parent 8ca9db2 commit b6a855a
2 files changed
Lines changed: 1 addition & 27 deletions
File tree
- amber/src
- main/scala/org/apache/texera/amber/engine/common/client
- test/scala/org/apache/texera/amber/engine/common/client
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | | - | |
78 | | - | |
79 | 76 | | |
80 | 77 | | |
81 | 78 | | |
| |||
109 | 106 | | |
110 | 107 | | |
111 | 108 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 109 | | |
120 | 110 | | |
121 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | 85 | | |
102 | 86 | | |
103 | 87 | | |
| |||
0 commit comments