[ZEPPELIN-6718] Carry every persisted field into a personalized user note #5494
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 421 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.362
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5494"
general
weight: 0.35
ParkGyeongTae
What is this PR for?
Reading a personalized note does not return the note itself.
NotebookService.getNotehands back a per-user copy built byNote.getUserNote(user), and that copy is assembled by moving fields across one at a time, covering 5 of the 11 persisted fields.path,defaultInterpreterGroup,version,info,noteParamsandnoteFormsare left null. Gson omits null fields, so those keys disappear from every response for a personalized note, over REST and WebSocket alike.pathis the one that breaks the UI. It is not stored in the note file: the path comes from where the file sits and is reattached byNoteManagerafter load, so a copy that loses it has nowhere to recover it from. The front end reads it to detect the trash folder,note.path.split('/')throws on undefined, and the exception aborts change detection so the notebook action bar is never rendered. That includes the button that turns personalized mode back off, which means a note switched to personalized mode cannot be switched back from the UI.The server defect has been there since
getUserNotewas introduced in ZEPPELIN-1594. The classic UI guarded against the missing value:The Angular UI carries the same check without that guard, which is what finally exposed the server side.
This PR copies the six missing fields. Because the copy is still written field by field, it also adds a regression test that walks every persisted field of
Noteby reflection and compares the copy against the original, so a field added toNotelater and not copied here fails by name.The front end is left alone on purpose.
pathis a value the server must always send; typing it as optional or guarding at the call site would let the same class of server defect pass unnoticed again, which is exactly why this one went unnoticed for so long.What type of PR is it?
Bug Fix
Todos
[x] Copy the six fields
getUserNotewas dropping[x] Add a reflection regression test that catches a future missing field
What is the Jira issue?
ZEPPELIN-6718
How should this be tested?
10 tests pass. Reverting the change to
Note.javawhile keeping the tests makes the two new ones fail and name the cause:Checked by hand as well. Create a note, switch it to personal mode, and open it. Before the change,
GET /api/notebook/{noteId}comes back withoutpathand the console repeats thespliterror while the action bar never renders. After it,pathis back, no errors are logged, the action bar renders, andSwitch to collaboration modecompletes the switch (personalizedMode: false).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