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.
2 files changed
tree: 328c529f8d358ad2f4c2d3e0f6af60ba448c410d
  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. notebook-migration-service/
  16. project/
  17. pyright-language-service/
  18. sql/
  19. workflow-compiling-service/
  20. .asf.yaml
  21. .dockerignore
  22. .gitattributes
  23. .gitignore
  24. .jvmopts
  25. .licenserc.yaml
  26. .scalafix.conf
  27. .scalafmt.conf
  28. AGENTS.md
  29. build.sbt
  30. CLAUDE.md
  31. codecov.yml
  32. CONTRIBUTING.md
  33. DISCLAIMER
  34. LICENSE
  35. NOTICE
  36. README.md
  37. 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} }