Matthew-DWM opened a new pull request, #9467:
URL: https://github.com/apache/texera/pull/9467

   ### What changes were proposed in this PR?
   
   Python debugger breakpoints outlived the run that set them:
   
   - A kill sends no final status for the paused operator, and the gutter 
followed only the operator status, so the dot and highlight stayed and a click 
sent `clear 1` to a dead worker.
   - Breakpoints live in the shared document, so a refreshed or reopened page 
gets them back. The only reset was in `UdfDebugService`, which is created on 
first use (by the code editor or the operator's Console) and only cleared 
operators the status service already knew; after a refresh, a run started 
before either was opened drew the old dot, and pdb answered `*** Breakpoint 
number 1 out of range`.
   
   Starting a run or a replay, and the end of a run, now clear every operator's 
debug state in one transaction, and the gutter is on only while the run's 
workers are up (running, pausing, paused, resuming or recovering). Turning it 
off, now also when the editor closes, removes the dots before 
`MonacoBreakpoint.dispose()`, and changes while it is off are ignored, so these 
clears cannot throw (yjs rethrows observer errors). These two pieces match 
#9030's.
   
   ```text
   Before: paused on line 11 → kill, or refresh and run → old dot stays → click 
→ clear 1  → no reply / "out of range"
   After:  paused on line 11 → kill, or refresh and run → no old dot    → click 
→ break 11 → stops on line 11
   ```
   
   #### Before (main)
   
   
https://github.com/user-attachments/assets/e0a021ff-871e-4c19-8234-8f2d316ea736
   
   #### After (this PR)
   
   
https://github.com/user-attachments/assets/38921882-ef9c-4491-a9a7-d26733d1472c
   
   ### Any related issues, documentation, discussions?
   
   Closes #9106. Independent of #9030 and #9218, which change the same debugger 
component.
   
   ### How was this PR tested?
   
   31 new tests, written before the fix, all pass with it. On main, 18 of them 
fail, and the 4 for the new WorkflowGraph.clearAllOperatorDebugStates() can't 
run because the method doesn't exist there yet; the other 9 check behavior that 
must stay the same. They cover the clears at run start and run end (refused 
runs, runs still going on and leaving the workspace keep breakpoints), and 
kill, failure, completion, a run still starting, closing and reopening on a 
real MonacoBreakpoint and Monaco model.
   
   From `frontend/`:
   
   ```sh
   yarn ng test --watch=false --include='**/workflow-graph.spec.ts' 
--include='**/execute-workflow.service.spec.ts' 
--include='**/code-debugger.component.spec.ts'
   yarn format:ci
   yarn build:ci
   yarn test:ci
   yarn ng run gui:test-browser
   ```
   
   Format/build passed; full suite: 7,267 passed, one existing skipped; browser 
specs 23/23; all changed lines covered.
   
   Automated browser run against a local stack, a Python worker paused on line 
11: kill, then click and reopen the editor; close the editor before the kill; 
refresh and run again, opening the editor before or after the run; refresh 
while still paused; read the workflow's collaboration room after the kill. On 
main the old dot stays after the kill and when the editor is opened after the 
rerun, a click sends `clear 1` to the dead worker or gets "out of range", and 
the room still holds the breakpoint. With this PR nothing from the old run is 
shown or kept in the room, a click sets `break 11` and stops there, and a 
refresh while paused keeps the live breakpoint.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 5.5)


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