This is an automated email from the ASF dual-hosted git repository.
yiconghuang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
The following commit(s) were added to refs/heads/main by this push:
new bf4d2b9073 fix(debugger): do not truncate debug messages (#3786)
bf4d2b9073 is described below
commit bf4d2b9073e7ebf623a04c7dada98c4a997029cf
Author: Yicong Huang <[email protected]>
AuthorDate: Wed Oct 1 10:24:51 2025 -0400
fix(debugger): do not truncate debug messages (#3786)
This PR fixes an issue where a breakpoint cannot be removed. The root
cause is that debugger rely on ConsoleMessages that contains events
emitted from debugger to update the debugger UI, however the message got
truncated, and lost information.
For instance:
```
Deleted breakpoint 1 at
/var/folders/vx/n8rz0dfx0lq3rmb976tsg1840000gn/T/tmprook3p18fsTempFS/udf-v1.py:9
```
has been truncated to:
```
Deleted breakpoint 1 at
/var/folders/vx/n8rz0dfx0lq3rmb976tsg1840000gn/T/tmprook3p18fsTem...
```
This causes the line number lost from the message, and UI cannot remove
breakpoint from the correct line.
This PR fixes the issue by temporarily disable truncating for
ConsoleMessages emitted by the debugger. A long term solution should not
truncate the ground truth message, but to alter display only.
---------
Signed-off-by: Yicong Huang <[email protected]>
---
.../edu/uci/ics/texera/web/service/ExecutionConsoleService.scala | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/core/amber/src/main/scala/edu/uci/ics/texera/web/service/ExecutionConsoleService.scala
b/core/amber/src/main/scala/edu/uci/ics/texera/web/service/ExecutionConsoleService.scala
index ca4bede2c6..f69a1c81d3 100644
---
a/core/amber/src/main/scala/edu/uci/ics/texera/web/service/ExecutionConsoleService.scala
+++
b/core/amber/src/main/scala/edu/uci/ics/texera/web/service/ExecutionConsoleService.scala
@@ -26,6 +26,7 @@ import edu.uci.ics.amber.config.ApplicationConfig
import
edu.uci.ics.amber.engine.architecture.rpc.controlcommands.ConsoleMessageType.COMMAND
import edu.uci.ics.amber.engine.architecture.rpc.controlcommands.{
ConsoleMessage,
+ ConsoleMessageType,
EvaluatePythonExpressionRequest,
DebugCommandRequest => AmberDebugCommandRequest
}
@@ -225,6 +226,10 @@ class ExecutionConsoleService(
* @return The truncated console message
*/
def processConsoleMessage(consoleMessage: ConsoleMessage): ConsoleMessage = {
+ // Do not truncate debugger messages
+ if (consoleMessage.msgType == ConsoleMessageType.DEBUGGER) {
+ return consoleMessage
+ }
ConsoleMessageProcessor.processConsoleMessage(consoleMessage,
consoleMessageDisplayLength)
}