You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "eugenegujing (via GitHub)" <gi...@apache.org> on 2026/10/13 04:24:54 UTC
[PR] fix(amber): reject reconfiguration of unsupported operators [texera]
eugenegujing opened a new pull request, #8969:
URL: https://github.com/apache/texera/pull/8969
### What changes were proposed in this PR?
**Root cause.** `ExecutionReconfigurationService.modifyOperatorLogic` calls the deployed operator's `runtimeReconfiguration` and matches its `Try`: a `Failure` is answered with `ModifyLogicResponse(isValid = false, message)`, which the frontend shows as an error notification. That arm was unreachable. The `LogicalOp` base implementation throws `UnsupportedOperationException("operator X does not support reconfiguration")` instead of returning `Failure`, and every production override returns `Success` or throws. So for an operator that advertises `supportReconfiguration = true` without an override (`PythonLambdaFunctionOpDesc`, `HuggingFaceSentimentAnalysisOpDesc`, `PythonUDFSourceOpDescV2`, `DummyOpDesc`), the exception escaped the service, reached the websocket catch-all in `WorkflowWebsocketResource`, and was recorded as a `COMPILATION_ERROR` fatal error on "unknown operator". The frontend maps that `WorkflowErrorEvent` to `ExecutionState.Failed`.
```
Before: Confirm Change on Python Lambda while paused -> UnsupportedOperationException escapes -> COMPILATION_ERROR -> canvas shows Failed, Kill disabled, Run offered; engine still PAUSED (workflow_executions.status = 2)
After: Confirm Change on Python Lambda while paused -> ModifyLogicResponse(isValid = false, "operator PythonLambdaFunctionOpDesc does not support reconfiguration") -> error notification shown, run stays paused, Resume still works
```
Screenshots from the reproduction on `adc6a4ac4` (Text Input -> Python UDF yielding once per second -> Python Lambda, run, pause, unlock the Python Lambda, change its expression, confirm):
| Before: paused, "Unlock for Logic Change" enabled | Before: after "Confirm Change", run shown as Failed |
| --- | --- |
| <img width="1263" height="799" alt="01-paused-unlock-enabled-python-lambda" src="https://github.com/user-attachments/assets/7e6918c1-5036-43a0-95e2-ce7d84894bec" /> | <img width="1263" height="799" alt="02-after-confirm-change-run-shown-failed" src="https://github.com/user-attachments/assets/80ae2fe1-60d8-4c98-9c45-a4f063bc2c3f" /> |
| Before: the error, visible only with no operator selected | Before: expanded stack trace |
| --- | --- |
| <img width="1263" height="799" alt="04-static-error-compilation-error-unsupported-reconfiguration" src="https://github.com/user-attachments/assets/964bd200-1e98-424e-9fd3-9c67e1a4139f" /> | <img width="1263" height="799" alt="05-static-error-expanded-stack-trace" src="https://github.com/user-attachments/assets/883390d0-a19a-4099-b81a-1ba332f1d3c9" /> |
With this branch, the same steps: "Confirm Change" is answered with an error notification reading `operator PythonLambdaFunctionOpDesc does not support reconfiguration`, the button still reads "Resume", Kill stays enabled, the execution row stays at PAUSED (status 2), `computing-unit-master.log` logs no websocket error, and Resume continues the same execution.
| After: error notification, run still paused | After: Resume continues the same run |
| --- | --- |
| <img width="1263" height="799" alt="07-after-fix-error-notification-run-stays-paused" src="https://github.com/user-attachments/assets/31488856-e2e1-4ae5-8e82-f5ce11ba2332" /> | <img width="1263" height="799" alt="08-after-fix-resume-continues-same-run" src="https://github.com/user-attachments/assets/1b43abed-b431-4ab1-a467-73862243ebcf" /> |
`computing-unit-master.log` at that moment, showing the engine still paused after the error:
```
[2026-10-10 20:19:12,136] [ERROR] [org.apache.texera.web.resource.WorkflowWebsocketResource] [dw-56] - error occurred in websocket
java.lang.UnsupportedOperationException: operator PythonLambdaFunctionOpDesc does not support reconfiguration
at org.apache.texera.amber.operator.LogicalOp.runtimeReconfiguration(LogicalOp.scala:495)
at org.apache.texera.web.service.ExecutionReconfigurationService.modifyOperatorLogic(ExecutionReconfigurationService.scala:80)
at org.apache.texera.web.resource.WorkflowWebsocketResource.myOnMsg(WorkflowWebsocketResource.scala:110)
...
[2026-10-10 20:19:12,152] [INFO] [org.apache.texera.web.WorkflowLifecycleManager] [dw-56] - [workflowId=WorkflowIdentity(5)] workflow state clean up postponed. current user count = 1, workflow status = PAUSED
```
**Changes.**
1. `ExecutionReconfigurationService.modifyOperatorLogic` wraps the `runtimeReconfiguration` call in `Try(...).flatten`. A thrown exception now takes the same path as a returned `Failure`: the response is `ModifyLogicResponse(opId, isValid = false, reason)`, nothing is appended to the pending reconfiguration queue, and the run stays paused. This also covers an override that throws while rebuilding its executor, for example from `getPhysicalOp`. `Try` catches `NonFatal` only, so an `InterruptedException` or a `VirtualMachineError` still propagates. The reason is the exception message, or the exception's string form when it has no message, so the notification is never empty.
2. No operator flag changes. The three operators above still show "Unlock for Logic Change" while paused; confirming an edit on them now shows "operator ... does not support reconfiguration" as an error notification instead of failing the run. Whether those operators should stop advertising `supportReconfiguration`, or get a real override, is a separate decision and is left out of this PR.
### Any related issues, documentation, discussions?
Closes #8967
### How was this PR tested?
Five new tests in `amber/src/test/scala/org/apache/texera/web/service/ExecutionReconfigurationServiceSpec.scala`, each of which fails without the change it covers:
- `modifyOperatorLogic should report an operator without a reconfiguration override as a rejected edit`: the deployed operator is a real `DummyOpDesc`, so the test goes through the `LogicalOp` base implementation that throws. Expects `isValid = false`, a message containing `DummyOpDesc does not support reconfiguration`, and a pending queue that still holds only the edit queued before the request.
- `modifyOperatorLogic should report an operator whose reconfiguration override throws as a rejected edit`: a test-only descriptor whose override throws `IllegalStateException`. Expects `isValid = false`, the exception message, and the same untouched queue.
- `modifyOperatorLogic should describe a rejection by its exception type when the exception has no message`: the override throws `new IllegalStateException()`; the response carries `java.lang.IllegalStateException` rather than null.
- `modifyOperatorLogic should let a fatal reconfiguration exception escape instead of reporting a rejection`: the override throws `InterruptedException`; `modifyOperatorLogic` throws it rather than answering with a rejection.
- `modifyOperatorLogic should accept a valid edit after a rejected one`: a rejected edit on a `DummyOpDesc` followed by a valid edit on a `LimitOpDesc` in the same workflow; the second is accepted and is the only entry in the pending queue.
The doc comment on the existing `RejectingReconfigurationOpDesc` no longer claims the `Failure` arm needs a test-only descriptor.
```
sbt "WorkflowExecutionService/testOnly org.apache.texera.web.service.ExecutionReconfigurationServiceSpec"
# Tests: succeeded 23, failed 0
sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.filter.FilterOpDescSpec org.apache.texera.amber.operator.map.MapOpDescSpec"
# 12 tests, 0 failures: the two "propagate exceptions from newOpDesc.getPhysicalOp" tests still pass, so overrides keep throwing and the service now catches
sbt "WorkflowExecutionService/scalafmtCheck" "WorkflowExecutionService/Test/scalafmtCheck"
# clean
```
Mutation check: removing the `Try(...).flatten` wrap fails the two rejected-edit tests, the no-message test and the accept-after-rejection test, while the fatal-exception test keeps passing; replacing the message fallback with a bare `exception.getMessage` fails only the no-message test.
Manual check in Chrome against a build of this branch on the local stack with a local computing unit:
1. Workflow: Text Input -> Python UDF whose `process_tuple` yields the input once per second for 900 seconds -> Python Lambda Function.
2. Click Run, wait until the UDF is producing output, click Pause. The button reads "Resume".
3. Select the Python Lambda Function, click "Unlock for Logic Change", change the expression, click "Confirm Change".
4. An error notification shows `operator PythonLambdaFunctionOpDesc does not support reconfiguration`; the button still reads "Resume" and Kill stays enabled; `workflow_executions` keeps status 2 (PAUSED); the master log has no "error occurred in websocket" entry. Click Resume: the same execution continues and the UDF's output count keeps climbing. On main the same steps showed the run as Failed (screenshots above).
### Was this PR authored or co-authored using generative AI tooling?
Yes. Generated-by: Claude Code (claude-fable-5-1). Co-authored with Claude; the author reviewed the change before submission.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): reject reconfiguration of unsupported operators [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8969:
URL: https://github.com/apache/texera/pull/8969#issuecomment-6138234609
<!-- texera-reviewer-suggestion -->
### Automated Reviewer Suggestions
Based on the `git blame` history of the changed files, we recommend the following reviewers:
- **Contributors with relevant context:** `@aglinxinyuan`
You can notify them by mentioning `@aglinxinyuan` in a comment.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): reject reconfiguration of unsupported operators [texera]
Posted by "kunwp1 (via GitHub) via notifications" <no...@texera.apache.org>.
kunwp1 merged PR #8969:
URL: https://github.com/apache/texera/pull/8969
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): reject reconfiguration of unsupported operators [texera]
Posted by "kunwp1 (via GitHub) via notifications" <no...@texera.apache.org>.
kunwp1 commented on code in PR #8969:
URL: https://github.com/apache/texera/pull/8969#discussion_r4569397532
##########
amber/src/test/scala/org/apache/texera/web/service/ExecutionReconfigurationServiceSpec.scala:
##########
@@ -477,6 +503,97 @@ class ExecutionReconfigurationServiceSpec
queued.map(_._1.id) shouldBe List(alreadyQueued.id)
}
+ /** Sends an edit to a deployed `deployedOp` with one reconfiguration already pending and
+ * returns the response together with the ids left in the pending queue.
+ */
+ private def modifyWithOnePending(
+ deployedOp: LogicalOp,
+ request: LogicalOp
+ ): (TexeraWebSocketEvent, List[PhysicalOpIdentity]) = {
+ val stateStore = new ExecutionStateStore
+ val service = new WorkflowOnlyService(stateStore, mkWorkflow(List(deployedOp)))
+ val alreadyQueued = mkPhysicalOp("already-queued")
+ stateStore.reconfigurationStore.updateState(_ =>
+ ExecutionReconfigurationStore(unscheduledReconfigurations = List((alreadyQueued, None)))
+ )
+ val response = service.modifyOperatorLogic(ModifyLogicRequest(request))
+ val queued = stateStore.reconfigurationStore.getState.unscheduledReconfigurations
+ (response, queued.map(_._1.id))
+ }
+
+ it should "report an operator without a reconfiguration override as a rejected edit" in {
+ // DummyOpDesc advertises supportReconfiguration but inherits the LogicalOp base, which
+ // throws UnsupportedOperationException instead of returning Failure.
+ val opId = "dummy-op"
+ val deployedOp = new DummyOpDesc
+ deployedOp.setOperatorId(opId)
+
+ val (response, queued) = modifyWithOnePending(deployedOp, mkLimitOp(opId, 7))
+
+ response shouldBe a[ModifyLogicResponse]
+ val rejected = response.asInstanceOf[ModifyLogicResponse]
+ rejected.opId shouldBe opId
+ rejected.isValid shouldBe false
+ rejected.errorMessage should include("DummyOpDesc does not support reconfiguration")
+ queued shouldBe List(mkPhysicalOp("already-queued").id)
+ }
+
+ it should "report an operator whose reconfiguration override throws as a rejected edit" in {
+ val opId = "throwing-op"
+ val deployedOp =
+ new ThrowingReconfigurationOpDesc(() => new IllegalStateException(thrownMessage))
+ deployedOp.setOperatorId(opId)
+
+ val (response, queued) = modifyWithOnePending(deployedOp, mkLimitOp(opId, 7))
+
+ response shouldBe a[ModifyLogicResponse]
+ val rejected = response.asInstanceOf[ModifyLogicResponse]
+ rejected.opId shouldBe opId
+ rejected.isValid shouldBe false
+ rejected.errorMessage shouldBe thrownMessage
+ queued shouldBe List(mkPhysicalOp("already-queued").id)
+ }
+
+ it should "describe a rejection by its exception type when the exception has no message" in {
+ val opId = "throwing-op"
+ val deployedOp = new ThrowingReconfigurationOpDesc(() => new IllegalStateException())
+ deployedOp.setOperatorId(opId)
+
+ val (response, queued) = modifyWithOnePending(deployedOp, mkLimitOp(opId, 7))
+
+ response shouldBe a[ModifyLogicResponse]
+ val rejected = response.asInstanceOf[ModifyLogicResponse]
+ rejected.isValid shouldBe false
+ rejected.errorMessage shouldBe "java.lang.IllegalStateException"
+ queued shouldBe List(mkPhysicalOp("already-queued").id)
+ }
+
+ it should "let a fatal reconfiguration exception escape instead of reporting a rejection" in {
+ val opId = "throwing-op"
+ val deployedOp = new ThrowingReconfigurationOpDesc(() => new InterruptedException("stop"))
+ deployedOp.setOperatorId(opId)
+
+ an[InterruptedException] should be thrownBy modifyWithOnePending(deployedOp, mkLimitOp(opId, 7))
+ }
+
+ it should "accept a valid edit after a rejected one" in {
+ val rejectedId = "dummy-op"
+ val dummy = new DummyOpDesc
+ dummy.setOperatorId(rejectedId)
+ val acceptedId = "limit-op"
+ val stateStore = new ExecutionStateStore
+ val service =
+ new WorkflowOnlyService(stateStore, mkWorkflow(List(dummy, mkLimitOp(acceptedId, 5))))
+
+ val first = service.modifyOperatorLogic(ModifyLogicRequest(mkLimitOp(rejectedId, 7)))
+ val second = service.modifyOperatorLogic(ModifyLogicRequest(mkLimitOp(acceptedId, 9)))
+
+ first.asInstanceOf[ModifyLogicResponse].isValid shouldBe false
+ second.asInstanceOf[ModifyLogicResponse].isValid shouldBe true
+ val queued = stateStore.reconfigurationStore.getState.unscheduledReconfigurations
+ queued.map(_._1.id.logicalOpId.id) shouldBe List(acceptedId)
+ }
Review Comment:
`modifyOperatorLogic` keeps nothing between calls apart from the pending queue, and the rejection tests above already check that a rejected edit leaves that queue as it was, so this case pins nothing they don't. The existing rejection test earlier in this block could also go through `modifyWithOnePending`, since it writes out the same setup.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): reject reconfiguration of unsupported operators [texera]
Posted by "eugenegujing (via GitHub)" <gi...@apache.org>.
eugenegujing commented on PR #8969:
URL: https://github.com/apache/texera/pull/8969#issuecomment-6390904388
/request-review @aglinxinyuan
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): reject reconfiguration of unsupported operators [texera]
Posted by "xuang7 (via GitHub) via notifications" <no...@texera.apache.org>.
xuang7 commented on PR #8969:
URL: https://github.com/apache/texera/pull/8969#issuecomment-6907547667
Removing release/v1.2: niche path, engine stays paused.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): reject reconfiguration of unsupported operators [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8969:
URL: https://github.com/apache/texera/pull/8969#issuecomment-6138231316
<!-- backport-auto-label-report -->
### Backport auto-label report
This `fix:` PR was checked against each actively-supported release branch. A `release/*` label nominates a backport target; the branch's release manager approving this PR is what sends the fix there. The required **Backport Approvals** check stays red until every label below is approved, so each manager either approves or removes their own label — which is why the labels left on a merged PR are exactly the branches it reached.
| Release branch | Analysis |
| --- | --- |
| ✅ `release/v1.3` | Change detected on this branch — label added; this fix is queued to backport here. @mengw15 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested. |
| ✅ `release/v1.2` | Change detected on this branch — label added; this fix is queued to backport here. @xuang7 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested. |
_[Auto-label run](https://github.com/apache/texera/actions/runs/38346321794)._
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): reject reconfiguration of unsupported operators [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8969:
URL: https://github.com/apache/texera/pull/8969#issuecomment-6138405763
<!-- texera-benchmarks-comment -->
## ⚠️ Benchmark changes need a look
🟢 2 better · 🔴 7 worse · ⚪ 6 noise (<±5%) · 0 without baseline
> Compared against main `6a29c59` 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](https://apache.github.io/texera/dev/bench/) · [Run](https://github.com/apache/texera/actions/runs/38346537962)
| | config | throughput | MB/s | latency | max Δ latest / 7d |
|---|---|---:|---:|---:|---:|
| 🔴 | bs=10 sw=10 sl=64 | 495 | 0.302 | 19,581/24,795/24,795 us | 🔴 +20.5% / 🔴 +58.2% |
| 🔴 | bs=100 sw=10 sl=64 | 1,171 | 0.715 | 83,483/103,590/103,590 us | 🔴 +10.1% / 🟢 -15.5% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,395 | 0.852 | 718,769/797,246/797,246 us | ⚪ within ±5% / 🟢 +31.8% |
<details><summary>Baseline details</summary>
Latest main `6a29c59` from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---:|---:|---:|---:|---:|
| bs=10 sw=10 sl=64 | throughput | 495 tuples/sec | 569 tuples/sec | 790.31 tuples/sec | -13.0% | -37.4% |
| bs=10 sw=10 sl=64 | MB/s | 0.302 MB/s | 0.347 MB/s | 0.482 MB/s | -13.0% | -37.4% |
| bs=10 sw=10 sl=64 | p50 | 19,581 us | 16,249 us | 12,375 us | +20.5% | +58.2% |
| bs=10 sw=10 sl=64 | p95 | 24,795 us | 28,620 us | 15,719 us | -13.4% | +57.7% |
| bs=10 sw=10 sl=64 | p99 | 24,795 us | 28,620 us | 19,058 us | -13.4% | +30.1% |
| bs=100 sw=10 sl=64 | throughput | 1,171 tuples/sec | 1,244 tuples/sec | 1,025 tuples/sec | -5.9% | +14.3% |
| bs=100 sw=10 sl=64 | MB/s | 0.715 MB/s | 0.76 MB/s | 0.626 MB/s | -5.9% | +14.3% |
| bs=100 sw=10 sl=64 | p50 | 83,483 us | 80,670 us | 98,759 us | +3.5% | -15.5% |
| bs=100 sw=10 sl=64 | p95 | 103,590 us | 94,108 us | 105,327 us | +10.1% | -1.6% |
| bs=100 sw=10 sl=64 | p99 | 103,590 us | 94,108 us | 120,491 us | +10.1% | -14.0% |
| bs=1000 sw=10 sl=64 | throughput | 1,395 tuples/sec | 1,422 tuples/sec | 1,059 tuples/sec | -1.9% | +31.7% |
| bs=1000 sw=10 sl=64 | MB/s | 0.852 MB/s | 0.868 MB/s | 0.646 MB/s | -1.8% | +31.8% |
| bs=1000 sw=10 sl=64 | p50 | 718,769 us | 702,840 us | 965,886 us | +2.3% | -25.6% |
| bs=1000 sw=10 sl=64 | p95 | 797,246 us | 815,154 us | 1,007,533 us | -2.2% | -20.9% |
| bs=1000 sw=10 sl=64 | p99 | 797,246 us | 815,154 us | 1,031,622 us | -2.2% | -22.7% |
</details>
<details><summary>Raw CSV</summary>
```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,404.14,200,128000,495,0.302,19581.33,24795.29,24795.29
1,100,10,64,20,1708.25,2000,1280000,1171,0.715,83483.00,103589.83,103589.83
2,1000,10,64,20,14333.54,20000,12800000,1395,0.852,718768.62,797245.89,797245.89
```
</details>
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): reject reconfiguration of unsupported operators [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #8969:
URL: https://github.com/apache/texera/pull/8969#issuecomment-6138512955
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/8969?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 92.61%. Comparing base ([`adc6a4a`](https://app.codecov.io/gh/apache/texera/commit/adc6a4ac4d79f0302534228d119ea2c22f393db7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`3747acf`](https://app.codecov.io/gh/apache/texera/commit/3747acf3b406563cdc7830917869bf12b52d187c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 9 commits behind head on main.
:white_check_mark: All tests successful. No failed tests found.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #8969 +/- ##
============================================
- Coverage 92.61% 92.61% -0.01%
Complexity 5059 5059
============================================
Files 1257 1257
Lines 53770 53769 -1
Branches 6706 6706
============================================
- Hits 49801 49800 -1
Misses 2314 2314
Partials 1655 1655
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/8969/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
|---|---|---|---|
| [access-control-service](https://app.codecov.io/gh/apache/texera/pull/8969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.38% <ø> (ø)` | | Carriedforward from [adc6a4a](https://app.codecov.io/gh/apache/texera/commit/adc6a4ac4d79f0302534228d119ea2c22f393db7?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [agent-service](https://app.codecov.io/gh/apache/texera/pull/8969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `99.16% <ø> (ø)` | | Carriedforward from [adc6a4a](https://app.codecov.io/gh/apache/texera/commit/adc6a4ac4d79f0302534228d119ea2c22f393db7?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [amber](https://app.codecov.io/gh/apache/texera/pull/8969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `88.09% <100.00%> (-0.01%)` | :arrow_down: | |
| [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/8969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `60.48% <ø> (ø)` | | Carriedforward from [adc6a4a](https://app.codecov.io/gh/apache/texera/commit/adc6a4ac4d79f0302534228d119ea2c22f393db7?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [config-service](https://app.codecov.io/gh/apache/texera/pull/8969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `87.37% <ø> (ø)` | | Carriedforward from [adc6a4a](https://app.codecov.io/gh/apache/texera/commit/adc6a4ac4d79f0302534228d119ea2c22f393db7?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [file-service](https://app.codecov.io/gh/apache/texera/pull/8969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `82.00% <ø> (ø)` | | Carriedforward from [adc6a4a](https://app.codecov.io/gh/apache/texera/commit/adc6a4ac4d79f0302534228d119ea2c22f393db7?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [frontend](https://app.codecov.io/gh/apache/texera/pull/8969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `96.59% <ø> (ø)` | | Carriedforward from [adc6a4a](https://app.codecov.io/gh/apache/texera/commit/adc6a4ac4d79f0302534228d119ea2c22f393db7?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/8969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.73% <ø> (ø)` | | Carriedforward from [adc6a4a](https://app.codecov.io/gh/apache/texera/commit/adc6a4ac4d79f0302534228d119ea2c22f393db7?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [pyamber](https://app.codecov.io/gh/apache/texera/pull/8969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `98.58% <ø> (ø)` | | Carriedforward from [adc6a4a](https://app.codecov.io/gh/apache/texera/commit/adc6a4ac4d79f0302534228d119ea2c22f393db7?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/8969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `74.09% <ø> (ø)` | | Carriedforward from [adc6a4a](https://app.codecov.io/gh/apache/texera/commit/adc6a4ac4d79f0302534228d119ea2c22f393db7?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
*This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/8969?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): reject reconfiguration of unsupported operators [texera]
Posted by "eugenegujing (via GitHub) via notifications" <no...@texera.apache.org>.
eugenegujing commented on code in PR #8969:
URL: https://github.com/apache/texera/pull/8969#discussion_r4572541725
##########
amber/src/test/scala/org/apache/texera/web/service/ExecutionReconfigurationServiceSpec.scala:
##########
@@ -477,6 +503,97 @@ class ExecutionReconfigurationServiceSpec
queued.map(_._1.id) shouldBe List(alreadyQueued.id)
}
+ /** Sends an edit to a deployed `deployedOp` with one reconfiguration already pending and
+ * returns the response together with the ids left in the pending queue.
+ */
+ private def modifyWithOnePending(
+ deployedOp: LogicalOp,
+ request: LogicalOp
+ ): (TexeraWebSocketEvent, List[PhysicalOpIdentity]) = {
+ val stateStore = new ExecutionStateStore
+ val service = new WorkflowOnlyService(stateStore, mkWorkflow(List(deployedOp)))
+ val alreadyQueued = mkPhysicalOp("already-queued")
+ stateStore.reconfigurationStore.updateState(_ =>
+ ExecutionReconfigurationStore(unscheduledReconfigurations = List((alreadyQueued, None)))
+ )
+ val response = service.modifyOperatorLogic(ModifyLogicRequest(request))
+ val queued = stateStore.reconfigurationStore.getState.unscheduledReconfigurations
+ (response, queued.map(_._1.id))
+ }
+
+ it should "report an operator without a reconfiguration override as a rejected edit" in {
+ // DummyOpDesc advertises supportReconfiguration but inherits the LogicalOp base, which
+ // throws UnsupportedOperationException instead of returning Failure.
+ val opId = "dummy-op"
+ val deployedOp = new DummyOpDesc
+ deployedOp.setOperatorId(opId)
+
+ val (response, queued) = modifyWithOnePending(deployedOp, mkLimitOp(opId, 7))
+
+ response shouldBe a[ModifyLogicResponse]
+ val rejected = response.asInstanceOf[ModifyLogicResponse]
+ rejected.opId shouldBe opId
+ rejected.isValid shouldBe false
+ rejected.errorMessage should include("DummyOpDesc does not support reconfiguration")
+ queued shouldBe List(mkPhysicalOp("already-queued").id)
+ }
+
+ it should "report an operator whose reconfiguration override throws as a rejected edit" in {
+ val opId = "throwing-op"
+ val deployedOp =
+ new ThrowingReconfigurationOpDesc(() => new IllegalStateException(thrownMessage))
+ deployedOp.setOperatorId(opId)
+
+ val (response, queued) = modifyWithOnePending(deployedOp, mkLimitOp(opId, 7))
+
+ response shouldBe a[ModifyLogicResponse]
+ val rejected = response.asInstanceOf[ModifyLogicResponse]
+ rejected.opId shouldBe opId
+ rejected.isValid shouldBe false
+ rejected.errorMessage shouldBe thrownMessage
+ queued shouldBe List(mkPhysicalOp("already-queued").id)
+ }
+
+ it should "describe a rejection by its exception type when the exception has no message" in {
+ val opId = "throwing-op"
+ val deployedOp = new ThrowingReconfigurationOpDesc(() => new IllegalStateException())
+ deployedOp.setOperatorId(opId)
+
+ val (response, queued) = modifyWithOnePending(deployedOp, mkLimitOp(opId, 7))
+
+ response shouldBe a[ModifyLogicResponse]
+ val rejected = response.asInstanceOf[ModifyLogicResponse]
+ rejected.isValid shouldBe false
+ rejected.errorMessage shouldBe "java.lang.IllegalStateException"
+ queued shouldBe List(mkPhysicalOp("already-queued").id)
+ }
+
+ it should "let a fatal reconfiguration exception escape instead of reporting a rejection" in {
+ val opId = "throwing-op"
+ val deployedOp = new ThrowingReconfigurationOpDesc(() => new InterruptedException("stop"))
+ deployedOp.setOperatorId(opId)
+
+ an[InterruptedException] should be thrownBy modifyWithOnePending(deployedOp, mkLimitOp(opId, 7))
+ }
+
+ it should "accept a valid edit after a rejected one" in {
+ val rejectedId = "dummy-op"
+ val dummy = new DummyOpDesc
+ dummy.setOperatorId(rejectedId)
+ val acceptedId = "limit-op"
+ val stateStore = new ExecutionStateStore
+ val service =
+ new WorkflowOnlyService(stateStore, mkWorkflow(List(dummy, mkLimitOp(acceptedId, 5))))
+
+ val first = service.modifyOperatorLogic(ModifyLogicRequest(mkLimitOp(rejectedId, 7)))
+ val second = service.modifyOperatorLogic(ModifyLogicRequest(mkLimitOp(acceptedId, 9)))
+
+ first.asInstanceOf[ModifyLogicResponse].isValid shouldBe false
+ second.asInstanceOf[ModifyLogicResponse].isValid shouldBe true
+ val queued = stateStore.reconfigurationStore.getState.unscheduledReconfigurations
+ queued.map(_._1.id.logicalOpId.id) shouldBe List(acceptedId)
+ }
Review Comment:
Fixed in b0da6cf21ae98f47dab15123979026745b5fb822.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): reject reconfiguration of unsupported operators [texera]
Posted by "eugenegujing (via GitHub) via notifications" <no...@texera.apache.org>.
eugenegujing commented on PR #8969:
URL: https://github.com/apache/texera/pull/8969#issuecomment-6673919570
@aglinxinyuan PTAL!
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber): reject reconfiguration of unsupported operators [texera]
Posted by "kunwp1 (via GitHub) via notifications" <no...@texera.apache.org>.
kunwp1 commented on PR #8969:
URL: https://github.com/apache/texera/pull/8969#issuecomment-6905869803
@xuang7 Do we need this feature for release 1.2?
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org