← Back to Pull requests

[ZEPPELIN-6416] Fix zeppelin-interpreter-shaded leak via zeppelin-jupyter-interpreter scope #5246

Closed
unknown closed this pull request without merging on May 14, 2026 00:55 UTC
View on GitHub
unknown unknown commented on May 10, 2026 04:27 UTC
Author

What is this PR for?

Fixes a regression that breaks all Selenium integration tests in zeppelin-integration (InterpreterIT, AuthenticationIT, ZeppelinIT, InterpreterModeActionsIT, SparkParagraphIT, PersonalizeActionsIT, ParagraphActionsIT) on master since the [ZEPPELIN-6355] zengine→server merge. They abort during MiniZeppelinServer startup with:

java.lang.ClassCastException: class shaded.org.apache.zeppelin.org.eclipse.aether.repository.RemoteRepository
  cannot be cast to class org.eclipse.aether.repository.RemoteRepository
  (... in unnamed module of loader 'app')
    at org.apache.zeppelin.interpreter.InterpreterSettingManager.<init>(InterpreterSettingManager.java:186)

Scope of impact

CI: frontend.yml selenium IT job has been red on every master push since 2026-05-05, blocking PR merges.
Runtime: no production impact. The Zeppelin distribution does not ship zeppelin-interpreter-shaded.jar on the server JVM classpath; the two-JVM isolation introduced by [ZEPPELIN-3689] still holds for deployed installations. The leak is confined to zeppelin-integration's test classpath.

Root cause

zeppelin-jupyter-interpreter/pom.xml re-declared its dependency on zeppelin-interpreter-shaded without scope, silently overriding the parent's <scope>provided</scope> and downgrading it to compile. That made the shaded jar transitive to anyone depending on zeppelin-jupyter-interpreter — in particular spark-interpreter (because IPySparkInterpreter extends IPythonInterpreter which extends JupyterKernelInterpreter), and onward into zeppelin-integration's test classpath via <dependency>spark-interpreter</dependency>.

Both unshaded zeppelin-interpreter.jar and zeppelin-interpreter-shaded.jar end up in the same test JVM. Because the shade plugin keeps org.apache.zeppelin.dep. class names un-relocated (per <exclude>org/apache/zeppelin/</exclude>) but rewrites their internal org.eclipse.aether. references to shaded.org.apache.zeppelin.org.eclipse.aether., both jars contain identically-named Booter / Repository / DependencyResolver classes that disagree on the RemoteRepository type. Whichever the classloader picks first wins; post-merge the shaded variant wins, so dependencyResolver.getRepos() returns shaded RemoteRepository instances which fail to cast to the unshaded type expected by InterpreterSettingManager.

The scope-omission has been latent since 2019-12 ([ZEPPELIN-4497]). The [ZEPPELIN-6355] merge changed the dependency-resolution order in zeppelin-integration's test classpath and exposed it.

What type of PR is it?

Bug Fix

Todos

[x] Drop the redundant zeppelin-interpreter-shaded redeclaration in zeppelin-jupyter-interpreter/pom.xml so the parent's provided applies
[x] Add maven-enforcer-plugin bannedDependencies rule on zeppelin-server and zeppelin-integration to catch any future leak
[x] Verify mvn dependency:tree is clean for zeppelin-server and zeppelin-integration
[x] Verify the enforcer rule fails as expected when the leak is reintroduced (negative test)
[ ] Verify frontend.yml selenium IT goes green on this PR

What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-6416 — this PR
https://issues.apache.org/jira/browse/ZEPPELIN-6417 — follow-up: extract zeppelin-jupyter-kernel-client library so interpreter modules never depend on the %jupyter magic interpreter artifact directly (structural decoupling)

How should this be tested?

# 1. Verify dep tree is clean (no zeppelin-interpreter-shaded)
./mvnw -pl zeppelin-server          dependency:tree -Pintegration -Pspark-scala-2.12 -Pspark-3.5 | grep zeppelin-interpreter-shaded
./mvnw -pl zeppelin-integration     dependency:tree -Pintegration -Pspark-scala-2.12 -Pspark-3.5 | grep zeppelin-interpreter-shaded
# both should produce no matches

# 2. Verify enforcer rule passes
./mvnw validate -pl zeppelin-server,zeppelin-integration -Pintegration -Pspark-scala-2.12 -Pspark-3.5

# 3. Negative test: reintroduce the leak (revert the jupyter-interpreter pom hunk) and run #2;
#    enforcer should fail with a BannedDependencies error pointing to ZEPPELIN-6416.

# 4. Full CI: rely on this PR's frontend.yml run.

Screenshots (if appropriate)

N/A

Questions

Does the license files need to update? No — pom-only change.
Is there breaking changes for older versions? No.

  • Does this needs documentation? No.
  • Diff: 566 lines (+424 / -142) across 7 files Reviewer: ParkGyeongTae Review duration: 5547m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.50) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 566 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.379
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5246"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 49.7% (MEDIUM) · Higher = larger blast radius
    49.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.5% · Safe to merge
    21.5%