bobbai00 opened a new issue, #6198: URL: https://github.com/apache/texera/issues/6198
### What happened? The synchronous workflow-execution endpoint (`SyncExecutionResource`) is supposed to return state `"Killed"` with a `"Timeout after N seconds"` error — and call `killExecution` — when a run exceeds its `timeoutSeconds`. Instead, a genuine timeout is **misclassified as a generic `"Error"`** and the execution is **not killed**. **Root cause.** The terminal wait is: ```scala Observable.amb(...).firstOrError().timeout(timeoutSeconds, SECONDS).blockingGet() ``` `firstOrError()` yields a `Single`, and RxJava's `Single.blockingGet()` rethrows a failure via `ExceptionHelper.wrapOrThrow`, which **wraps the checked `java.util.concurrent.TimeoutException`** (thrown by `.timeout()`) **in a `RuntimeException`**. The catch clause matches on: ```scala case _: java.util.concurrent.TimeoutException => // Killed ``` which never matches the wrapped exception, so control falls through to the generic `case e: Exception => // Error` branch. **Expected:** a timeout is detected (by unwrapping the cause chain), reported as `state = "Killed"` with `"Timeout after N seconds"`, and the execution is killed. ### How to reproduce? 1. Submit a workflow to the sync-execution endpoint with a small `timeoutSeconds`. 2. Ensure no terminal signal (completion / console-error / target-results) arrives before the timeout elapses. 3. Observe the response: `state = "Error"` carrying the raw wrapped-exception message, instead of `state = "Killed"` / `"Timeout after N seconds"`; the execution is not killed. ### Version/Branch 1.3.0-incubating-SNAPSHOT (main) ### Commit Hash (Optional) Present on `main`; the branch behavior is unchanged from the introduction of the `case _: TimeoutException` catch. ### Relevant log output _n/a — the timeout is silently reclassified as a generic error._ -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
