Skip to content

[ZEPPELIN-6664] Add notebook core SDK wire fields - #5480

Open
voidmatcha wants to merge 1 commit into
apache:masterfrom
voidmatcha:ZEPPELIN-6664-sdk-notebook-fields
Open

voidmatcha wants to merge 1 commit into
apache:masterfrom
voidmatcha:ZEPPELIN-6664-sdk-notebook-fields

Conversation

@voidmatcha

@voidmatcha voidmatcha commented Sep 14, 2026

Copy link
Copy Markdown
Member

What is this PR for?

Declare five notebook WebSocket fields that the server already sends but the SDK types omitted, so Shared Notebook Core can build on typed values instead of casts. This PR adds those declarations only; it does not model every payload variant or every nullable nested value.

  • ParagraphItem.progress: number: zeppelin-server/src/main/java/org/apache/zeppelin/notebook/Paragraph.java:78 (primitive int, always serialized). Declared fields enumerated across Paragraph.java:73-99, zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/Job.java:84-93 and JobWithProgressPoller.java:23.
  • Note.note.version?: string: zeppelin-server/src/main/java/org/apache/zeppelin/notebook/Note.java:77, range Note.java:73-98. Optional because a personalized GET_NOTE returns getUserNote() (Note.java:948-967, reached from NotebookService.java:147-151), which is built without a version.
  • EditorSettingReceived.editor.completionKey?: string: emitted by NotebookServer.java:2240-2248 through NotebookService.java:1244-1246 and InterpreterSettingManager.java:616-685, which returns the interpreter's editor map (for example livy/src/main/resources/interpreter-setting.json:137). Optional because many editor blocks and the default map (InterpreterSettingManager.java:111-113) omit it.
  • AngularObjectRemove.angularObject? and .interpreterGroupId?: sent only by NotebookServer.java:1495-1498; the other emit site (NotebookServer.java:2218-2231) omits both. Nested fields come from zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/AngularObject.java:42-49. Correcting loosely typed payload shapes is tracked by ZEPPELIN-6676.

ImportNote keeps using ImportParagraphItem, where progress and version stay optional, because an imported note file is user input and may not carry them. TypeScript callers that construct a received ParagraphItem now have to set progress; the paragraph test fixture in this PR does so.

What type of PR is it?

Improvement

Todos

  • Declare the five fields
  • Add a type-level contract spec, typechecked in the Maven test phase

What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-6664

How should this be tested?

The first command typechecks the contract spec and the second executes it. The third checks WebSocket operation names and message-map consistency, not payload fields.

cd zeppelin-web-angular
npm run typecheck:sdk-contracts
npx vitest run --config vitest.shell.config.mts projects/zeppelin-sdk/src/interfaces/notebook-wire-fields.spec.ts
npm run check:websocket-contract

Screenshots (if appropriate)

N/A

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@voidmatcha voidmatcha closed this Sep 14, 2026
@voidmatcha voidmatcha reopened this Sep 20, 2026
@voidmatcha
voidmatcha force-pushed the ZEPPELIN-6664-sdk-notebook-fields branch from c7212f0 to 15ce4eb Compare September 20, 2026 06:25
@voidmatcha
voidmatcha marked this pull request as ready for review September 20, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant