You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@zeppelin.apache.org by "HwangRock (via GitHub)" <gi...@apache.org> on 2026/08/15 11:04:41 UTC
[PR] [ZEPPELIN-5235] Add Cancel all paragraphs button to the new UI [zeppelin]
HwangRock opened a new pull request, #5425:
URL: https://github.com/apache/zeppelin/pull/5425
### What is this PR for?
The note action bar has a run-all button but no way to stop a note from the UI. Stopping a running
note is only reachable through `PUT /api/notebook/job/{noteId}`, so a user who starts a long note has
to leave the page and issue a REST call, or cancel each paragraph one by one.
This adds a `Cancel all paragraphs` button next to run-all in the new UI. The button sends a new
`CANCEL_ALL_PARAGRAPHS` websocket message, and `cancelAllParagraphs()` in `NotebookService` aborts
every paragraph of the note that has not terminated yet.
The abort loop already existed inline in `stopNoteJobs()` in `NotebookRestApi`. It is extracted to
`Note.abortAll()` so the REST endpoint and the websocket handler share one implementation instead of
drifting apart. Permission handling follows the existing run path: the service checks
`Permission.RUNNER` the same way `cancelParagraph()` does, and the note is reached through
`notebook.processNote()` so the note lock is held while paragraphs are aborted.
No new cancellation mechanism is introduced. `Note.abortAll()` calls the existing `Paragraph.abort()`,
which delegates to `interpreter.cancel()` exactly as single-paragraph cancel does today. The button is
disabled in revision view and while no paragraph is running.
### What type of PR is it?
Improvement
### Todos
* [x] - Extract `Note.abortAll()` and reuse it from `stopNoteJobs()`
* [x] - Add `CANCEL_ALL_PARAGRAPHS` op and `NotebookService.cancelAllParagraphs()`
* [x] - Add the button to the new UI action bar and the message to the SDK
* [x] - Unit tests for the notebook, service and socket layers
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-5235
### How should this be tested?
`NotebookServiceTest` covers the success path, the forbidden path for a non-runner, and an unknown
note id. `NotebookServerTest` covers the op routing. `NotebookTest` covers `Note.abortAll()` leaving
terminated paragraphs alone.
Manually: create a note with six python paragraphs where the first two finish within a few seconds and
the rest sleep for minutes, run all, then press the button while a paragraph is running. The running
paragraph moves to ABORT, the finished ones keep FINISHED, and paragraphs that never started stay
untouched.
### Screenshots (if appropriate)
### Questions:
* Does the license files need to update? No.
* Is there breaking changes for older versions? No. The REST behaviour is unchanged and the new op is additive.
* Does this needs documentation? No.
--
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: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-5235] Add Cancel all paragraphs button to the new UI [zeppelin]
Posted by "voidmatcha (via GitHub)" <gi...@apache.org>.
voidmatcha commented on PR #5425:
URL: https://github.com/apache/zeppelin/pull/5425#issuecomment-5329274556
Merged into master (2cc438b7).
--
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: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-5235] Add Cancel all paragraphs button to the new UI [zeppelin]
Posted by "HwangRock (via GitHub)" <gi...@apache.org>.
HwangRock commented on PR #5425:
URL: https://github.com/apache/zeppelin/pull/5425#issuecomment-5307307325
Good catch, `stopNoteJobs()` is `@DELETE`, not `PUT`. Fixed the description. Thanks @voidmatcha!
--
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: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-5235] Add Cancel all paragraphs button to the new UI [zeppelin]
Posted by "voidmatcha (via GitHub)" <gi...@apache.org>.
voidmatcha merged PR #5425:
URL: https://github.com/apache/zeppelin/pull/5425
--
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: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org