[ZEPPELIN-6400] Remove ZeppelinConfiguration dependency from zeppelin-interpreter module#5167
Open
[ZEPPELIN-6400] Remove ZeppelinConfiguration dependency from zeppelin-interpreter module#5167
Conversation
…-interpreter module Move ZeppelinConfiguration to zeppelin-zengine so it is no longer included in the shaded interpreter JAR. This prevents the Maven shade plugin from corrupting config string literals, which caused classpath- order-dependent configuration loading failures. Key changes: - Replace ZeppelinConfiguration usage in zeppelin-interpreter with Properties-based configuration - Update InterpreterLauncher, LifecycleManager, RecoveryStorage, DependencyResolver to accept Properties instead of ZeppelinConfiguration - Update all launcher plugins (Docker, K8s, YARN, Flink) accordingly - Move ZeppelinConfiguration.java and ZeppelinLocationStrategy.java from zeppelin-interpreter to zeppelin-zengine - Update callers in zeppelin-zengine, zeppelin-server, flink, and markdown interpreters Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
FlexmarkParser now accepts Properties for better extensibility, instead of a single boolean escapeHtml parameter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…onnectTimeout ZeppelinConfiguration parsed time values like "600s" internally, but after switching to Properties, the raw string is passed directly. Add parseTimeValue() to handle "s" (seconds) and "ms" (milliseconds) suffixes in timeout configuration values. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…zengine Move server-side-only classes (InterpreterLauncher, InterpreterClient, InterpreterLaunchContext, RecoveryStorage, InterpreterLauncherTest) from zeppelin-interpreter to zeppelin-zengine. This allows launcher plugins and recovery storage to keep using ZeppelinConfiguration directly, eliminating unnecessary Properties conversion code. Reverts launcher plugins and zengine launcher/recovery files to their original ZeppelinConfiguration-based implementations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Long.parseLong() cannot parse values like "10s" that include time unit suffixes. Added parseTimeValue() method that handles plain numbers, "ms" suffix, and Duration-style formats (e.g., "10s", "1h") - matching the behavior of ZeppelinConfiguration.getTime(). This fixes the CI hang where TimeoutLifecycleManagerTest.testTimeout_2 entered an infinite "Wait for interpreter to be started" loop because the LifecycleManager constructor failed with NumberFormatException. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…um test Use clickAndWait() instead of clickableWait().click() when clicking the Bar Chart button, so the UI has time to update the active class before assertion. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR removes ZeppelinConfiguration from the shaded zeppelin-interpreter module by migrating interpreter-side configuration to Properties, preventing shade-plugin string-literal corruption and classpath-order-dependent config failures.
Changes:
- Replaced
ZeppelinConfigurationusage in interpreter runtime paths withProperties(lifecycle managers, remote server, dependency resolution, markdown, Flink). - Updated
DependencyResolver/BooterAPIs to accept explicit proxy + Maven repo URL parameters instead ofZeppelinConfiguration. - Adjusted server/zengine callers and tests to use the new constructors and properties-based configuration.
Reviewed changes
Copilot reviewed 30 out of 37 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java | Switches remote interpreter server config from ZeppelinConfiguration to Properties, including defaults for key runtime settings. |
| zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManager.java | Introduces properties-based timeout settings and new time parsing logic for lifecycle timeouts. |
| zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/SchedulerFactory.java | Replaces ZeppelinConfiguration static lookup with env/system-property based thread pool sizing. |
| zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/AbstractDependencyResolver.java | Refactors dependency resolution to take explicit proxy credentials and Maven repo URL. |
| markdown/src/main/java/org/apache/zeppelin/markdown/FlexmarkParser.java | Switches markdown HTML escaping config from ZeppelinConfiguration to a properties key. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
...rpreter/src/main/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManager.java
Show resolved
Hide resolved
...rpreter/src/main/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManager.java
Show resolved
Hide resolved
...nterpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
Show resolved
Hide resolved
zeppelin-interpreter/src/main/java/org/apache/zeppelin/scheduler/SchedulerFactory.java
Show resolved
Hide resolved
...nterpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
Show resolved
Hide resolved
...nterpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterServer.java
Show resolved
Hide resolved
Member
Author
|
@Reamer @tbonelee @ParkGyeongTae Could you please check and review it? 🙏 cc/ @seung-00 |
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.
Summary
ZeppelinConfigurationfromzeppelin-interpretertozeppelin-zengineso it is no longer included in the shaded interpreter JAR. This prevents the Maven shade plugin from corrupting config string literals, which caused classpath-order-dependent configuration loading failures.ZeppelinConfigurationusage inzeppelin-interpreterwithProperties-based configuration acrossInterpreterLauncher,LifecycleManager,RecoveryStorage,DependencyResolver, and all launcher plugins (Docker, K8s, YARN, Flink).zeppelin-zengine,zeppelin-server,flink, andmarkdowninterpreter modules.TimeoutLifecycleManagerto parse time unit suffixes (e.g.,"10s","1000ms") by addingparseTimeValue(). Previously,Long.parseLong("10s")threwNumberFormatException, causing theTimeoutLifecycleManagerTest.testTimeout_2to enter an infinite loop and hang CI for 6 hours.PersonalizeActionsIT.testGraphActionSelenium test by usingclickAndWait()instead ofclickableWait().click(), allowing the UI to update before assertion.Motivation
ZeppelinConfigurationinzeppelin-interpretergets processed by the Maven shade plugin, which corrupts string literals (e.g.,org.apache.zeppelin→unshaded.org.apache.zeppelin). This causes config keys to mismatch at runtime depending on classpath ordering. Moving it tozeppelin-zengine(which is not shaded) permanently eliminates this class of bugs.As discussed by the community: "ZeppelinConfiguration belongs to the Zeppelin server, and the Zeppelin interpreter should really only work on a HashMap with ConfigKey and ConfigValue."
Changes
zeppelin-interpreter(core)ZeppelinConfigurationimports; usePropertiesfor configInterpreterLauncherZeppelinConfiguration zConf→Properties zPropertiesLifecycleManager/RecoveryStoragePropertiesinstead ofZeppelinConfigurationTimeoutLifecycleManagerparseTimeValue()to handle time unit suffixes ("10s","1000ms")DependencyResolverZeppelinConfigurationProperties-based APIzeppelin-zenginePluginManagerpasses derived values (absolute paths) via PropertiesZeppelinConfiguration.javazeppelin-interpreter→zeppelin-zenginePersonalizeActionsITtestGraphActionby waiting for UI update after clickFuture Work
Some logic was duplicated during this refactoring to keep
zeppelin-interpreterindependent ofZeppelinConfiguration:TimeoutLifecycleManager.parseTimeValue()duplicatesZeppelinConfiguration.timeUnitToMill()— both parse time strings like"10s"or"1000ms"viaDuration.parse("PT" + value). A shared utility inzeppelin-commoncould consolidate this in the future."zeppelin.interpreter.lifecyclemanager.timeout.threshold") are now hardcoded as plain strings inzeppelin-interpreterrather than referencingConfVarsenum constants. If config key management becomes an issue, a lightweight key constants class could be introduced.Test Plan
core.yml- Core module tests (includingTimeoutLifecycleManagerTest)core.yml- Interpreter tests (Spark, Flink)frontend.yml- E2E tests (Playwright + Selenium)quick.yml- RAT license checkZeppelinConfiguration