Yicong-Huang opened a new pull request, #4512:
URL: https://github.com/apache/texera/pull/4512
### What changes were proposed in this PR?
Fixes four correctness gaps in
`WorkerDebugCommandHandler.translate_debug_command` that were pinned as quirks
by the unit tests added in #4510:
| Input | Before | After |
| --- | --- | --- |
| `""` / `" "` | `ValueError: not enough values to unpack` |
`ValueError("debug command cannot be empty")` |
| `b foo.py:5` | `b my_udf:foo.py:5` (rejected by pdb) | `b foo.py:5`
(passed through) |
| `b my_func` | `b my_udf:my_func` (rejected by pdb — filename prefix
requires lineno) | `b my_func` (passed through; pdb resolves the symbol) |
| `b 5` with `operator_module_name = None` | `b None:5` (no such module) |
`ValueError("executor module not initialized; cannot set breakpoint")` |
The rule is now: **only prepend `module:` when the target is a numeric line
in the operator's own UDF module.** Function-name and explicit
`filename:lineno` forms — both of which pdb already accepts — pass through
unchanged.
### Any related issues, documentation, discussions?
Closes #4511. Follow-up to #4510 (which introduced the tests that exposed
these gaps).
### How was this PR tested?
- Updated the four pinning tests from #4510
(`test_break_with_function_name_*`, `test_break_with_explicit_filename_*`,
`test_module_name_none_*`, `test_empty_command_*`) to assert the new
intentional behaviors.
- Added one new test for the function-name fallback when the executor module
isn't initialized yet.
- Local: `python -m pytest core/architecture/managers/test_debug_manager.py
core/architecture/handlers/control/test_debug_command_handler.py` — 35 passed.
- Local: `ruff format --check .` and `ruff check .` — clean.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.7)
--
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]