fix(execution-service): surface init-time fatal errors to the websocket (#5781)

### What changes were proposed in this PR?

When workflow execution initialization fails, the error was recorded
into the execution metadata store but never pushed to the websocket, so
connected frontend clients saw nothing — particularly for failures
during `WorkflowExecutionService` construction, which happens *before*
the execution is published to subscribers.

`WorkflowService.initExecutionService`'s catch arm now, after
`errorHandler(e)` records the fatal error, pushes a `WorkflowErrorEvent`
(carrying the recorded fatal errors) to `errorSubject` — the
workflow-level channel that `connect()` subscribers listen on — so
init-time failures surface in the UI.

| init failure | before | after |
|---|---|---|
| during `WorkflowExecutionService` construction (pre-publish) | logged
+ stored, invisible to the UI | `WorkflowErrorEvent` delivered to the
frontend |
| during `executeWorkflow()` | recorded; UI delivery depended on
subscription timing | `WorkflowErrorEvent` delivered to the frontend |

The push is extracted into a small `reportFatalErrorsToSubscribers`
method so it can be unit-tested without a database (the init path itself
is DB-bound).

### Any related issues, documentation, discussions?

Resolves #5782. Discovered while splitting #5700 (loop operators) into
smaller PRs; this fix is independent of that feature and applies to
`main` on its own.

### How was this PR tested?

New `WorkflowServiceSpec` (TDD, red → green): pins that
`reportFatalErrorsToSubscribers` delivers a `WorkflowErrorEvent` to a
`connect()` subscriber carrying exactly the fatal errors recorded in the
execution state store (single error, and all errors when several are
present). `sbt "WorkflowExecutionService/testOnly *WorkflowServiceSpec"`
passes (2/2); scalafmt + scalafix clean.

### Was this PR authored or co-authored using generative AI tooling?

Co-authored with Claude Opus 4.8 in compliance with ASF.

(backported from commit 1c580e59eb69bc45205298606c3980c67a05803f)
2 files changed
tree: 8450471e02e750aa7c640194445a89c2dbd8c686
  1. .github/
  2. .run/
  3. access-control-service/
  4. agent-service/
  5. amber/
  6. bin/
  7. common/
  8. computing-unit-managing-service/
  9. config-service/
  10. docs/
  11. file-service/
  12. frontend/
  13. licenses/
  14. licenses-3rd-party-code/
  15. project/
  16. pyright-language-service/
  17. sql/
  18. workflow-compiling-service/
  19. .asf.yaml
  20. .dockerignore
  21. .gitattributes
  22. .gitignore
  23. .jvmopts
  24. .licenserc.yaml
  25. .scalafix.conf
  26. .scalafmt.conf
  27. AGENTS.md
  28. build.sbt
  29. CLAUDE.md
  30. codecov.yml
  31. CONTRIBUTING.md
  32. DISCLAIMER
  33. LICENSE
  34. NOTICE
  35. README.md
  36. SECURITY.md
README.md

Apache Texera (Incubating) is an open-source platform for human-AI collaborative data science using visual workflows. It enables human analysts to construct, execute, and refine data analysis tasks through an intuitive GUI, assisted by AI agents that understand natural-language instructions. Texera is well suited for a wide range of applications, including “AI for Science,” by making advanced AI and data science capabilities accessible to a broader community. It can run on a laptop for local use or be deployed in the cloud to support scalable processing of large datasets.

The platform has the following key features:

  • Natural-language data science through AI agents
  • Intuitive GUI-based workflows for data science
  • Real-time collaboration for workflow editing and execution
  • Runtime debugging and interactive workflow execution
  • Language-agnostic workflow runtime, native support for Python and Java
  • Parallel backend engine for scalable big-data processing
  • Separation of compute and storage for flexible cloud deployment

texera-screenshot

Citation

Please cite Texera as


@article{DBLP:journals/pvldb/WangHNKALLDL24, author = {Zuozhi Wang and Yicong Huang and Shengquan Ni and Avinash Kumar and Sadeem Alsudais and Xiaozhen Liu and Xinyuan Lin and Yunyan Ding and Chen Li}, title = {Texera: {A} System for Collaborative and Interactive Data Analytics Using Workflows}, journal = {Proc. {VLDB} Endow.}, volume = {17}, number = {11}, pages = {3580--3588}, year = {2024}, url = {https://www.vldb.org/pvldb/vol17/p3580-wang.pdf}, timestamp = {Thu, 19 Sep 2024 13:09:37 +0200}, biburl = {https://dblp.org/rec/journals/pvldb/WangHNKALLDL24.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} }