Skip to content

[ZEPPELIN-6335] Fix failing zengine tests caused by invalid interpreters.json - #5081

Merged
tbonelee merged 2 commits into
apache:masterfrom
tbonelee:fix-test-resource
Sep 27, 2025
Merged

[ZEPPELIN-6335] Fix failing zengine tests caused by invalid interpreters.json#5081
tbonelee merged 2 commits into
apache:masterfrom
tbonelee:fix-test-resource

Conversation

@tbonelee

Copy link
Copy Markdown
Contributor

What is this PR for?

Tests in the zeppelin-zengine module were failing. The main reason was that the interpreter.json in test resources were invalid: the value object did not have an id field matching its corresponding key.
As a result, the deserialized InterpreterSetting instance had an auto-genarated id field, causing the key and value.id to be inconsistent.
Before #5063, invalid settings were simply skipped. However, after that change, they caused a NPE.

This PR fixes the invalid JSON files and adds minor validation logic in the deserialization method so that such issues can be detected early by users.

What type of PR is it?

Bug Fix

What is the Jira issue?

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

How should this be tested?

  • Check core-modules - zeppelin-zengine tests in CI

Questions:

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

@voidmatchavoidmatcha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@tbonelee
tbonelee merged commit 80ff51c into apache:masterSep 27, 2025
26 of 33 checks passed
tbonelee added a commit that referenced this pull request Sep 27, 2025
…ers.json
### What is this PR for?
Tests in the `zeppelin-zengine` module were failing. The main reason was that the `interpreter.json` in test resources were invalid: the value object did not have an `id` field matching its corresponding key.
As a result, the deserialized `InterpreterSetting` instance had an auto-genarated `id` field, causing the key and value.id to be inconsistent.
Before #5063, invalid settings were simply skipped. However, after that change, they caused a NPE.
This PR fixes the invalid JSON files and adds minor validation logic in the deserialization method so that such issues can be detected early by users.
### What type of PR is it?
Bug Fix
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-6335
### How should this be tested?
* Check `core-modules` - `zeppelin-zengine` tests in CI
### Questions:
* Does the license files need to update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Closes#5081 from tbonelee/fix-test-resource.
Signed-off-by: ChanHo Lee <chanholee@apache.org>
(cherry picked from commit 80ff51c)
Signed-off-by: ChanHo Lee <chanholee@apache.org>
@tboneleetbonelee changed the title [ZEPPELIN-6336] Fix failing zengine tests caused by invalid interpreters.json[ZEPPELIN-6335] Fix failing zengine tests caused by invalid interpreters.jsonSep 27, 2025
@tbonelee
tbonelee deleted the fix-test-resource branch September 27, 2025 04:36
@tbonelee

Copy link
Copy Markdown
ContributorAuthor

Thanks for the reviews, merged into master and branch-0.12.

Sign up for freeto 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.

3 participants

@tbonelee@voidmatcha@pan3793