[ZEPPELIN-6395] Fix NumberFormatException for numeric interpreter properties in New UI#5147
Closed
kevinjmh wants to merge 1 commit into
Closed
[ZEPPELIN-6395] Fix NumberFormatException for numeric interpreter properties in New UI#5147kevinjmh wants to merge 1 commit into
kevinjmh wants to merge 1 commit into
Conversation
Member
Author
|
See #5265 |
tbonelee
added a commit
that referenced
this pull request
Jun 16, 2026
### 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"`), breaking `Long`/`Integer` parsing 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 `InterpreterItemComponent` from `UntypedFormBuilder` to typed reactive forms: - Non-checkbox values are sent as strings (like the classic UI); checkbox values stay real booleans, and `"true"`/`"false"` strings from corrupted data are normalized back on save. - New request DTOs mirror the fields `InterpreterOption.java` actually reads; the UI-only `session`/`process` fields (dead since ZEPPELIN-1210) are no longer sent. - Fixes wrong `Properties.value`/`type` interface 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 <at>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 by `ng build` (strict, 0 errors), lint/prettier, and manually: numeric property saves as `"60000"` in `interpreter.json` (create and update), JDBC paragraph runs without `NumberFormatException`, 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: * Does the license files need to update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Closes #5265 from tbonelee/ZEPPELIN-6427-typed-interpreter-forms. Signed-off-by: ChanHo Lee <chanholee@apache.org>
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?
Problem:
The New UI (Angular) saves numeric interpreter properties as JavaScript number types, which get deserialized to Java Double by Gson. When these properties are converted to strings (e.g., 60000.0), parsing them as Long or Integer fails with NumberFormatException.
Solution:
Convert all property values to strings in the New UI before sending to the backend, matching the behavior of the Old UI which uses strings for all property values.
What type of PR is it?
Bug Fix
Todos
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-6395
How should this be tested?
Screenshots (if appropriate)
Questions: