Skip to content

[ZEPPELIN-6602] Add a transport-neutral interpreter RPC contract harness - #5375

Draft
jongyoul wants to merge 2 commits into
apache:masterfrom
jongyoul:codex/grpc-rpc-contract-tests
Draft

[ZEPPELIN-6602] Add a transport-neutral interpreter RPC contract harness#5375
jongyoul wants to merge 2 commits into
apache:masterfrom
jongyoul:codex/grpc-rpc-contract-tests

Conversation

@jongyoul

@jongyoul jongyoul commented Aug 3, 2026

Copy link
Copy Markdown
Member

What is this PR for?

This is the first test-only slice (G-01A) of ZEPPELIN-6601, the Server–Interpreter RPC migration Epic.

The earlier draft characterized only the current Thrift wire. This revision establishes the reusable behavioral regression seam that later transport PRs will consume:

  • InterpreterRpcContractDriver defines transport-neutral request/result values, lifecycle operations, probe hooks, fault hooks, and semantic failure categories.
  • AbstractInterpreterRpcContractTest owns the common control-plane scenarios.
  • InterpreterRpcContractFixture exposes the same executable Interpreter fixture and probe handle to future transport modules.
  • zeppelin-interpreter publishes these test sources in its tests classifier JAR.
  • ThriftInterpreterRpcContractDriver runs the common scenarios through real TSocket/TBinaryProtocol connections and the generated client/processor.
  • A small Thrift-only wire smoke retains raw TTransportException and declared InterpreterRPCException assertions.

The shared scenarios cover:

  • create idempotence, lazy open, form type, completion, interpret, and close invalidation
  • representative authentication/context and result/config/GUI mappings
  • exact round-trip integrity for a 1 MiB-plus UTF-8 payload
  • concurrent RUNNING status, progress, cancel delivery, and the terminal cancel result
  • execution-result errors and normalized operation, missing-interpreter, and unavailable-transport failures

The common scenario/API sources import no Thrift or generated transport types. The executable fixture temporarily references InterpreterCompletion only because it is still part of the public Interpreter API; G-02 removes that API leak without changing the shared scenario bodies. The Thrift adapter and wire smoke are temporary and are removed with Thrift, while the common suite and fixture remain for gRPC.

Out of scope: production gRPC or production API changes, callback/event RPCs, pooled-client retry/deadlines, shutdown ambiguity, recovery, launchers, process registration, and shaded-distribution checks. Those have separate child Tasks under the Epic.

What type of PR is it?

Improvement

Todos

  • Separate common behavioral scenarios from transport-specific assertions
  • Make the common suite and executable fixture consumable from a future gRPC test module
  • Run focused and full zeppelin-interpreter verification
  • Link the Epic and G-01A Task

What is the Jira issue?

How should this be tested?

./mvnw -pl zeppelin-interpreter \
  -Dtest=ThriftInterpreterRpcContractTest \
  -Dmaven.gitcommitid.skip=true test

./mvnw -pl zeppelin-interpreter \
  -Dmaven.gitcommitid.skip=true test

./mvnw -pl zeppelin-interpreter \
  -DskipTests \
  -Dmaven.gitcommitid.skip=true \
  -Dcheckstyle.includes='**/AbstractInterpreterRpcContractTest.java,**/InterpreterRpcContractDriver.java,**/InterpreterRpcContractFixture.java,**/ThriftInterpreterRpcContractDriver.java,**/ThriftInterpreterRpcContractTest.java' \
  checkstyle:check

./mvnw -pl zeppelin-interpreter \
  -DskipTests \
  -Dmaven.gitcommitid.skip=true \
  -Prat apache-rat:check

./mvnw -pl zeppelin-interpreter \
  -DskipTests \
  -Dmaven.gitcommitid.skip=true package

Local results:

  • contract scenarios plus Thrift wire smoke: 5 passed
  • complete zeppelin-interpreter module: 131 passed
  • changed-file Checkstyle: 0 violations
  • RAT: 0 unapproved licenses
  • package: main JAR and zeppelin-interpreter-0.13.0-SNAPSHOT-tests.jar produced
  • external-package compile probe: a future-style subclass can consume the abstract suite and fixture handle from the tests JAR

Screenshots (if appropriate)

Not applicable.

Questions:

  • No production Java code, runtime dependency, configuration, or behavior changes.
  • The only POM change attaches a test classifier JAR using an existing repository pattern.
  • User-facing documentation is not needed for this test-only slice; the architecture proposal is tracked separately as a draft ZIP.

@jongyoul jongyoul changed the title Add Thrift interpreter RPC contract tests [ZEPPELIN-6602] Add a transport-neutral interpreter RPC contract harness Aug 6, 2026
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.

1 participant