You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/06/18 23:17:30 UTC
[PR] refactor(amber): centralize uncaught-exception console reporting [texera]
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(amber): centralize uncaught-exception console reporting [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #5783:
URL: https://github.com/apache/texera/pull/5783#issuecomment-4746929694
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/5783?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 53.30%. Comparing base ([`731d671`](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`57b35b4`](https://app.codecov.io/gh/apache/texera/commit/57b35b4d73a48bbadf8df91a8d7d469b86ad78bb?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #5783 +/- ##
=========================================
Coverage 53.30% 53.30%
Complexity 2668 2668
=========================================
Files 1098 1098
Lines 42532 42532
Branches 4575 4575
=========================================
Hits 22673 22673
Misses 18530 18530
Partials 1329 1329
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/5783/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
|---|---|---|---|
| [access-control-service](https://app.codecov.io/gh/apache/texera/pull/5783/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.44% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [agent-service](https://app.codecov.io/gh/apache/texera/pull/5783/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.36% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [amber](https://app.codecov.io/gh/apache/texera/pull/5783/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.81% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/5783/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `1.65% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [config-service](https://app.codecov.io/gh/apache/texera/pull/5783/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.71% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [file-service](https://app.codecov.io/gh/apache/texera/pull/5783/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.06% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [frontend](https://app.codecov.io/gh/apache/texera/pull/5783/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `48.00% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [pyamber](https://app.codecov.io/gh/apache/texera/pull/5783/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.13% <100.00%> (ø)` | | |
| [python](https://app.codecov.io/gh/apache/texera/pull/5783/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.76% <ø> (-0.04%)` | :arrow_down: | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/5783/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `58.69% <ø> (ø)` | | Carriedforward from [731d671](https://app.codecov.io/gh/apache/texera/commit/731d671ccb4ce8bd5bf3f1b55fa4f0ee949567c5?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
*This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/5783?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(amber): centralize uncaught-exception console reporting [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5783:
URL: https://github.com/apache/texera/pull/5783#issuecomment-4746938876
<!-- texera-benchmarks-comment -->
## ⚠️ Benchmark changes need a look
🟢 2 better · 🔴 3 worse · ⚪ 10 noise (<±5%) · 0 without baseline
> Compared against main `731d671` benchmarked on **this same runner**, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.
[Dashboard](https://apache.github.io/texera/dev/bench/) · [Run](https://github.com/apache/texera/actions/runs/27795212921)
| | config | throughput | MB/s | latency | max Δ latest / 7d |
|---|---|---:|---:|---:|---:|
| 🔴 | bs=10 sw=10 sl=64 | 413 | 0.252 | 24,765/29,026/29,026 us | 🔴 +24.1% / 🟢 -17.0% |
| 🔴 | bs=100 sw=10 sl=64 | 805 | 0.492 | 122,343/150,385/150,385 us | 🔴 +5.6% / 🔴 -9.7% |
| ⚪ | bs=1000 sw=10 sl=64 | 920 | 0.561 | 1,087,535/1,121,610/1,121,610 us | ⚪ within ±5% / 🔴 +11.8% |
<details><summary>Baseline details</summary>
Latest main `731d671` from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---:|---:|---:|---:|---:|
| bs=10 sw=10 sl=64 | throughput | 413 tuples/sec | 427 tuples/sec | 410.82 tuples/sec | -3.3% | +0.5% |
| bs=10 sw=10 sl=64 | MB/s | 0.252 MB/s | 0.261 MB/s | 0.251 MB/s | -3.4% | +0.5% |
| bs=10 sw=10 sl=64 | p50 | 24,765 us | 19,952 us | 23,785 us | +24.1% | +4.1% |
| bs=10 sw=10 sl=64 | p95 | 29,026 us | 34,214 us | 34,980 us | -15.2% | -17.0% |
| bs=10 sw=10 sl=64 | p99 | 29,026 us | 34,214 us | 34,980 us | -15.2% | -17.0% |
| bs=100 sw=10 sl=64 | throughput | 805 tuples/sec | 823 tuples/sec | 891.94 tuples/sec | -2.2% | -9.7% |
| bs=100 sw=10 sl=64 | MB/s | 0.492 MB/s | 0.502 MB/s | 0.544 MB/s | -2.0% | -9.6% |
| bs=100 sw=10 sl=64 | p50 | 122,343 us | 121,580 us | 112,277 us | +0.6% | +9.0% |
| bs=100 sw=10 sl=64 | p95 | 150,385 us | 142,450 us | 139,802 us | +5.6% | +7.6% |
| bs=100 sw=10 sl=64 | p99 | 150,385 us | 142,450 us | 139,802 us | +5.6% | +7.6% |
| bs=1000 sw=10 sl=64 | throughput | 920 tuples/sec | 925 tuples/sec | 1,041 tuples/sec | -0.5% | -11.6% |
| bs=1000 sw=10 sl=64 | MB/s | 0.561 MB/s | 0.564 MB/s | 0.635 MB/s | -0.5% | -11.7% |
| bs=1000 sw=10 sl=64 | p50 | 1,087,535 us | 1,076,750 us | 972,714 us | +1.0% | +11.8% |
| bs=1000 sw=10 sl=64 | p95 | 1,121,610 us | 1,141,672 us | 1,023,057 us | -1.8% | +9.6% |
| bs=1000 sw=10 sl=64 | p99 | 1,121,610 us | 1,141,672 us | 1,023,057 us | -1.8% | +9.6% |
</details>
<details><summary>Raw CSV</summary>
```csv
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,484.20,200,128000,413,0.252,24765.33,29025.72,29025.72
1,100,10,64,20,2483.16,2000,1280000,805,0.492,122343.21,150384.76,150384.76
2,1000,10,64,20,21741.94,20000,12800000,920,0.561,1087534.65,1121610.46,1121610.46
```
</details>
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(amber): centralize uncaught-exception console reporting [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on code in PR #5783:
URL: https://github.com/apache/texera/pull/5783#discussion_r3449950954
##########
amber/src/test/python/core/util/console_message/test_error_message.py:
##########
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import sys
+
+from core.util.console_message.error_message import create_error_console_message
+from proto.org.apache.texera.amber.engine.architecture.rpc import ConsoleMessageType
+
+
+class TestCreateErrorConsoleMessage:
+ def test_builds_error_console_message_from_exc_info(self):
+ # create_error_console_message turns an exc_info into a single ERROR
+ # ConsoleMessage: title is the exception's final line, message is the
+ # full formatted traceback, and source encodes the raising frame.
+ try:
+ raise ValueError("boom from udf")
+ except ValueError:
+ exc_info = sys.exc_info()
+
+ msg = create_error_console_message("worker-7", exc_info)
+
+ assert msg.worker_id == "worker-7"
+ assert msg.msg_type == ConsoleMessageType.ERROR
+ assert msg.title == "ValueError: boom from udf"
+ assert "Traceback (most recent call last)" in msg.message
+ assert "ValueError: boom from udf" in msg.message
+ # source encodes "<module>:<func>:<line>" of the raising frame
+ parts = msg.source.split(":")
+ assert len(parts) == 3
+ assert parts[0] == "test_error_message"
+ assert parts[1] == "test_builds_error_console_message_from_exc_info"
Review Comment:
Added four failure-path cases in `edf60ef`:
- `source` points to the deepest (raising) frame, not the catch frame
- a chained `raise ... from ...` reports the active error with the full chain
- an exception with no message uses the bare class name as the title
- a missing traceback (exception never raised) is still reported — with a small guard so the reporter never itself throws on a degenerate `exc_info`
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(amber): centralize uncaught-exception console reporting [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5783:
URL: https://github.com/apache/texera/pull/5783#issuecomment-4763533860
<!-- texera-reviewer-suggestion -->
### Automated Reviewer Suggestions
Based on the `git blame` history of the changed files, we recommend the following reviewers:
- **Contributors with relevant context:** `@Yicong-Huang`
You can notify them by mentioning `@Yicong-Huang` in a comment.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(amber): centralize uncaught-exception console reporting [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on code in PR #5783:
URL: https://github.com/apache/texera/pull/5783#discussion_r3439483967
##########
amber/src/main/python/core/architecture/managers/console_message_manager.py:
##########
@@ -30,3 +37,32 @@ def get_messages(self, force_flush: bool = False) -> Iterator[ConsoleMessage]:
def put_message(self, msg: ConsoleMessage) -> None:
self.print_buf.put(msg)
+
+ def report_exception(self, worker_id: str, exc_info: ExceptionInfo) -> None:
+ """Queue an ERROR console message describing ``exc_info``.
+
+ Builds the operator-facing error message for an uncaught exception,
+ whether it surfaced from a UDF on the data path (DataProcessor) or
+ from a user expression evaluated on the main loop thread. Centralizing
+ it keeps both paths reporting identically; callers are responsible for
+ recording the exception with the exception manager and flushing/pausing
+ as appropriate.
+ """
+ tb = traceback.extract_tb(exc_info[2])
+ filename, line_number, func_name, text = tb[-1]
Review Comment:
Done — bound the unused traceback line (was `text`) to `_`.
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(amber): centralize uncaught-exception console reporting [texera]
Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang commented on code in PR #5783:
URL: https://github.com/apache/texera/pull/5783#discussion_r3448888873
##########
amber/src/main/python/core/architecture/managers/console_message_manager.py:
##########
@@ -30,3 +37,32 @@ def get_messages(self, force_flush: bool = False) -> Iterator[ConsoleMessage]:
def put_message(self, msg: ConsoleMessage) -> None:
self.print_buf.put(msg)
+
+ def report_exception(self, worker_id: str, exc_info: ExceptionInfo) -> None:
Review Comment:
can we move this out? the manager is responsive for the message management, without worry about what's inside the message. that's why the interfaces are all on the `msg: ConsoleMessage` level.
You can have a separate util place to create a message, for this case, an Error message.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(amber): centralize uncaught-exception console reporting [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on code in PR #5783:
URL: https://github.com/apache/texera/pull/5783#discussion_r3449179929
##########
amber/src/main/python/core/architecture/managers/console_message_manager.py:
##########
@@ -30,3 +37,32 @@ def get_messages(self, force_flush: bool = False) -> Iterator[ConsoleMessage]:
def put_message(self, msg: ConsoleMessage) -> None:
self.print_buf.put(msg)
+
+ def report_exception(self, worker_id: str, exc_info: ExceptionInfo) -> None:
Review Comment:
Done — moved the construction out into `core/util/console_message/error_message.py::create_error_console_message`, which just returns a `ConsoleMessage`. `DataProcessor` now builds via the factory and queues it with the manager's existing `put_message`, so `ConsoleMessageManager` is back to message-management only. Added `test_error_message.py` for the factory. (`4bdc966`)
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(amber): centralize uncaught-exception console reporting [texera]
Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang commented on code in PR #5783:
URL: https://github.com/apache/texera/pull/5783#discussion_r3449239337
##########
amber/src/test/python/core/util/console_message/test_error_message.py:
##########
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import sys
+
+from core.util.console_message.error_message import create_error_console_message
+from proto.org.apache.texera.amber.engine.architecture.rpc import ConsoleMessageType
+
+
+class TestCreateErrorConsoleMessage:
+ def test_builds_error_console_message_from_exc_info(self):
+ # create_error_console_message turns an exc_info into a single ERROR
+ # ConsoleMessage: title is the exception's final line, message is the
+ # full formatted traceback, and source encodes the raising frame.
+ try:
+ raise ValueError("boom from udf")
+ except ValueError:
+ exc_info = sys.exc_info()
+
+ msg = create_error_console_message("worker-7", exc_info)
+
+ assert msg.worker_id == "worker-7"
+ assert msg.msg_type == ConsoleMessageType.ERROR
+ assert msg.title == "ValueError: boom from udf"
+ assert "Traceback (most recent call last)" in msg.message
+ assert "ValueError: boom from udf" in msg.message
+ # source encodes "<module>:<func>:<line>" of the raising frame
+ parts = msg.source.split(":")
+ assert len(parts) == 3
+ assert parts[0] == "test_error_message"
+ assert parts[1] == "test_builds_error_console_message_from_exc_info"
Review Comment:
as we are working on this, can you add some failure path tests?
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(amber): centralize uncaught-exception console reporting [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan merged PR #5783:
URL: https://github.com/apache/texera/pull/5783
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(amber): centralize uncaught-exception console reporting [texera]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #5783:
URL: https://github.com/apache/texera/pull/5783#discussion_r3439428387
##########
amber/src/main/python/core/architecture/managers/console_message_manager.py:
##########
@@ -30,3 +37,32 @@ def get_messages(self, force_flush: bool = False) -> Iterator[ConsoleMessage]:
def put_message(self, msg: ConsoleMessage) -> None:
self.print_buf.put(msg)
+
+ def report_exception(self, worker_id: str, exc_info: ExceptionInfo) -> None:
+ """Queue an ERROR console message describing ``exc_info``.
+
+ Builds the operator-facing error message for an uncaught exception,
+ whether it surfaced from a UDF on the data path (DataProcessor) or
+ from a user expression evaluated on the main loop thread. Centralizing
+ it keeps both paths reporting identically; callers are responsible for
+ recording the exception with the exception manager and flushing/pausing
+ as appropriate.
+ """
+ tb = traceback.extract_tb(exc_info[2])
+ filename, line_number, func_name, text = tb[-1]
Review Comment:
`text` is assigned via traceback tuple-unpacking but never used. Ruff/pyflakes will flag this as an unused local variable (F841), which can fail the Amber CI lint step. Use a dummy variable name (e.g., `_`) instead.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org