[ZEPPELIN-6427] Convert interpreter setting form to typed reactive forms#5265
Open
tbonelee wants to merge 1 commit into
Open
[ZEPPELIN-6427] Convert interpreter setting form to typed reactive forms#5265tbonelee wants to merge 1 commit into
tbonelee wants to merge 1 commit into
Conversation
Numeric interpreter properties edited in the Angular UI were sent as JSON numbers, which Gson deserializes as Double (e.g. 60000 -> "60000.0") and breaks Long/Integer parsing in interpreters such as JDBC (ZEPPELIN-6395). The server-side mitigation from ZEPPELIN-6131 only covers the update path, so creating a new interpreter was still affected. - Send non-checkbox property values as strings; keep checkbox values as real booleans (matching the classic UI) and normalize values previously persisted as "true"/"false" strings - Convert InterpreterItemComponent from UntypedFormBuilder to typed reactive forms so the property value union is checked at compile time; remove the eslint-disabled any casts and a no-op sort in handleSave - Introduce InterpreterSettingRequest/InterpreterPropertyValue DTOs aligned with the server-side InterpreterOption.java: stop sending UI-only session/process fields, mark response option fields that Gson omits when null as optional, and fix the wrong Properties.value/type interface types 🤖 Generated with [Claude Code](https://claude.com/claude-code) Assisted-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR for?
Numeric interpreter properties edited in the Angular UI are sent as JSON numbers, which Gson deserializes as
Double(60000→"60000.0"), breakingLong/Integerparsing in interpreters such as JDBC (ZEPPELIN-6395). The server-side workaround from ZEPPELIN-6131 only covers the update path, not create.This PR fixes it on the client by converting
InterpreterItemComponentfromUntypedFormBuilderto typed reactive forms:"true"/"false"strings from corrupted data are normalized back on save.InterpreterOption.javaactually reads; the UI-onlysession/processfields (dead since ZEPPELIN-1210) are no longer sent.Properties.value/typeinterface types; response option fields that Gson omits when null are now optional.Alternative to #5147, which stringifies checkbox booleans too — persisting
"false"makes an unchecked checkbox render as checked on reload. Credit to @kevinjmh for the original diagnosis.What type of PR is it?
Improvement
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-6427 (fixes ZEPPELIN-6395)
How should this be tested?
No unit test infra exists in
zeppelin-web-angular(Playwright e2e only), so verified byng build(strict, 0 errors), lint/prettier, and manually: numeric property saves as"60000"ininterpreter.json(create and update), JDBC paragraph runs withoutNumberFormatException, unchecked checkbox stays unchecked after reload, and a regression pass over create/edit/cancel, property and dependency CRUD, and interpreter binding mode options.Screenshots (if appropriate)
N/A
Questions: