Skip to content

[ZEPPELIN-6400] Remove ZeppelinConfiguration dependency from zeppelin-interpreter module#5167

Open
jongyoul wants to merge 6 commits intomasterfrom
ZEPPELIN-6400-remove-zepconf-from-interpreter
Open

[ZEPPELIN-6400] Remove ZeppelinConfiguration dependency from zeppelin-interpreter module#5167
jongyoul wants to merge 6 commits intomasterfrom
ZEPPELIN-6400-remove-zepconf-from-interpreter

Conversation

@jongyoul
Copy link
Member

@jongyoul jongyoul commented Mar 6, 2026

Summary

  • Move ZeppelinConfiguration from zeppelin-interpreter 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.
  • Replace ZeppelinConfiguration usage in zeppelin-interpreter with Properties-based configuration across InterpreterLauncher, LifecycleManager, RecoveryStorage, DependencyResolver, and all launcher plugins (Docker, K8s, YARN, Flink).
  • Update callers in zeppelin-zengine, zeppelin-server, flink, and markdown interpreter modules.
  • Fix TimeoutLifecycleManager to parse time unit suffixes (e.g., "10s", "1000ms") by adding parseTimeValue(). Previously, Long.parseLong("10s") threw NumberFormatException, causing the TimeoutLifecycleManagerTest.testTimeout_2 to enter an infinite loop and hang CI for 6 hours.
  • Fix flaky PersonalizeActionsIT.testGraphAction Selenium test by using clickAndWait() instead of clickableWait().click(), allowing the UI to update before assertion.

Motivation

ZeppelinConfiguration in zeppelin-interpreter gets processed by the Maven shade plugin, which corrupts string literals (e.g., org.apache.zeppelinunshaded.org.apache.zeppelin). This causes config keys to mismatch at runtime depending on classpath ordering. Moving it to zeppelin-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

Area Change
zeppelin-interpreter (core) Remove ZeppelinConfiguration imports; use Properties for config
InterpreterLauncher ZeppelinConfiguration zConfProperties zProperties
LifecycleManager / RecoveryStorage Constructor takes Properties instead of ZeppelinConfiguration
TimeoutLifecycleManager Add parseTimeValue() to handle time unit suffixes ("10s", "1000ms")
DependencyResolver Accept individual config values instead of ZeppelinConfiguration
Launcher plugins (7 files) Updated to Properties-based API
zeppelin-zengine PluginManager passes derived values (absolute paths) via Properties
ZeppelinConfiguration.java Moved from zeppelin-interpreterzeppelin-zengine
PersonalizeActionsIT Fix flaky testGraphAction by waiting for UI update after click

Future Work

Some logic was duplicated during this refactoring to keep zeppelin-interpreter independent of ZeppelinConfiguration:

  • TimeoutLifecycleManager.parseTimeValue() duplicates ZeppelinConfiguration.timeUnitToMill() — both parse time strings like "10s" or "1000ms" via Duration.parse("PT" + value). A shared utility in zeppelin-common could consolidate this in the future.
  • Config key strings (e.g., "zeppelin.interpreter.lifecyclemanager.timeout.threshold") are now hardcoded as plain strings in zeppelin-interpreter rather than referencing ConfVars enum constants. If config key management becomes an issue, a lightweight key constants class could be introduced.

Test Plan

  • CI: core.yml - Core module tests (including TimeoutLifecycleManagerTest)
  • CI: core.yml - Interpreter tests (Spark, Flink)
  • CI: frontend.yml - E2E tests (Playwright + Selenium)
  • CI: quick.yml - RAT license check
  • Verify shaded JAR does not contain ZeppelinConfiguration

jongyoul and others added 6 commits March 6, 2026 17:48
…-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>
@jongyoul jongyoul marked this pull request as ready for review March 13, 2026 09:15
Copilot AI review requested due to automatic review settings March 13, 2026 09:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 ZeppelinConfiguration usage in interpreter runtime paths with Properties (lifecycle managers, remote server, dependency resolution, markdown, Flink).
  • Updated DependencyResolver/Booter APIs to accept explicit proxy + Maven repo URL parameters instead of ZeppelinConfiguration.
  • 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.

@jongyoul
Copy link
Member Author

@Reamer @tbonelee @ParkGyeongTae Could you please check and review it? 🙏

cc/ @seung-00

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

2 participants