aglinxinyuan opened a new pull request, #5783:
URL: https://github.com/apache/texera/pull/5783

   ### What changes were proposed in this PR?
   
   `DataProcessor` built the operator-facing ERROR console message for an 
uncaught UDF exception inline (`_report_exception`). This moves that 
construction into `ConsoleMessageManager.report_exception(worker_id, exc_info)` 
— the worker's single owner of console messages — and has `DataProcessor` 
delegate to it.
   
   Behavior-preserving: the same ERROR `ConsoleMessage` is queued on the same 
buffer —
   
   | field | value |
   |---|---|
   | `msg_type` | `ConsoleMessageType.ERROR` |
   | `title` | the exception's final line (e.g. `ValueError: ...`) |
   | `message` | the full formatted traceback |
   | `source` | `module:func:line` of the raising frame |
   
   Centralizing it lets other uncaught-exception paths report identically (the 
loop operators' main-loop condition evaluation reuses it in a follow-up).
   
   ### Any related issues, documentation, discussions?
   
   Split out of #5700 (loop operators) to keep that PR focused; the refactor is 
independent and behavior-preserving on `main`.
   
   ### How was this PR tested?
   
   - New 
`test_console_message_manager.py::test_report_exception_emits_error_console_message`
 pins the ERROR-message construction (worker id, ERROR type, title, traceback 
body, `module:func:line` source) — written test-first (red: `AttributeError: no 
report_exception` → green).
   - The existing `test_data_processor.py` (which asserts console messages 
after a UDF raises) still passes unchanged, confirming the delegation preserves 
behavior.
   - `cd amber && pytest -m "not integration"` on the affected files: 12 
passed; `black --check` clean.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Co-authored with Claude Opus 4.8 in compliance with ASF.
   


-- 
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]

Reply via email to