The GitHub Actions job "Required Checks" on texera.git/gh-readonly-queue/main/pr-8969-b516b2c65b3293887cafd03d92145b0283bb8328 has succeeded. Run started by GitHub user kunwp1 (triggered by kunwp1).
Head commit for run: f80f6f79b3b060be7051b672fd549d99afb9b56d / Eugene Gu <[email protected]> fix(amber): reject reconfiguration of unsupported operators (#8969) ### What changes were proposed in this PR? **Root cause.** `ExecutionReconfigurationService.modifyOperatorLogic` matches the `Try` returned by the operator's `runtimeReconfiguration` and answers a `Failure` with `ModifyLogicResponse(isValid = false)`. But the `LogicalOp` base implementation throws `UnsupportedOperationException` instead of returning `Failure`, so for an operator that advertises `supportReconfiguration = true` without an override (`PythonLambdaFunctionOpDesc`, `HuggingFaceSentimentAnalysisOpDesc`, `PythonUDFSourceOpDescV2`) the exception escapes to the websocket catch-all, is recorded as a `COMPILATION_ERROR` fatal error, and the frontend shows the paused run as Failed while the engine is still paused. ``` Before: Confirm Change on Python Lambda while paused -> exception escapes -> canvas shows Failed, Kill disabled; engine still PAUSED After: Confirm Change on Python Lambda while paused -> ModifyLogicResponse(isValid = false, "operator ... does not support reconfiguration") -> error notification, run stays paused, Resume works ``` | Before: after "Confirm Change", run shown as Failed | Before: the error, visible only with no operator selected | After: error notification, run still paused | | --- | --- | --- | | <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" /> | <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="07-after-fix-error-notification-run-stays-paused" src="https://github.com/user-attachments/assets/31488856-e2e1-4ae5-8e82-f5ce11ba2332" /> | **Changes.** 1. `modifyOperatorLogic` wraps the `runtimeReconfiguration` call in `Try(...).flatten`, so a thrown exception takes the same rejected-edit path as a returned `Failure`: nothing is queued and the run stays paused. This also covers an override that throws while rebuilding its executor. `Try` catches `NonFatal` only. When the exception has no message, the response carries its string form instead of null. 2. No operator flag changes. The three operators above still offer "Unlock for Logic Change"; whether they should stop advertising `supportReconfiguration` or get a real override is left out of this PR. ### Any related issues, documentation, discussions? Closes #8967 ### How was this PR tested? Four new tests in `ExecutionReconfigurationServiceSpec`, each failing without the change it covers: a real `DummyOpDesc` whose base implementation throws; a test-only override that throws; a message-less exception reported by its type; an `InterruptedException` that still escapes. The three rejection tests also expect the pending queue untouched. ``` sbt "WorkflowExecutionService/testOnly org.apache.texera.web.service.ExecutionReconfigurationServiceSpec" # Tests: succeeded 22, failed 0 sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.filter.FilterOpDescSpec org.apache.texera.amber.operator.map.MapOpDescSpec" # 12 tests, 0 failures (the "propagate exceptions from getPhysicalOp" tests still pass) sbt "WorkflowExecutionService/scalafmtCheck" "WorkflowExecutionService/Test/scalafmtCheck" # clean ``` Mutation check: removing the `Try(...).flatten` wrap fails three of the new tests; replacing the message fallback with a bare `exception.getMessage` fails the no-message test. Manual check in Chrome on the local stack: Text Input -> Python UDF yielding once per second -> Python Lambda; Run, Pause, unlock the Python Lambda, change its expression, Confirm Change. On main the run is shown as Failed; on this branch an error notification appears, the button still reads "Resume", `workflow_executions` stays at PAUSED, and Resume continues the same execution. ### 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. Report URL: https://github.com/apache/texera/actions/runs/43810947476 With regards, GitHub Actions via GitBox
