Skip to content

[ZEPPELIN-6660] Add notebook parity registry - #5456

Merged
tbonelee merged 3 commits into
apache:masterfrom
voidmatcha:ZEPPELIN-6660-parity-scenarios
Sep 9, 2026
Merged

tbonelee merged 3 commits into
apache:masterfrom
voidmatcha:ZEPPELIN-6660-parity-scenarios

Conversation

@voidmatcha

Copy link
Copy Markdown
Member

What is this PR for?

This PR records the current Angular Notebook behaviour in a reusable parity registry.

The editable source is JSON and the human-readable Markdown table is generated from it. Each scenario has a stable NB-PARITY-### identifier and links either to an existing Playwright E2E test or to the Jira issue that tracks the remaining work.

The validator rejects drift between JSON and generated Markdown, duplicate or invalid scenario identifiers, unsupported coverage states, a covered claim without an executable Playwright test carrying the same identifier, incomplete scenarios without a Jira issue, and invalid evidence or test paths.

Existing Notebook Playwright test titles now carry the stable scenario identifiers, and the frontend CI workflow runs the registry check.

This does not implement missing E2E behaviour or claim that React Notebook parity is complete. It establishes the characterization baseline that later Angular, Shared Core, and React work can compare against.

The generated registry and validation approach follows Apache Ambari's React parity matrix work:

What type of PR is it?

Improvement

Todos

  • Add a JSON Notebook parity registry
  • Generate the reviewable Markdown view from the registry
  • Add generation and validation tests, including failure cases
  • Link existing Notebook Playwright coverage through stable scenario identifiers
  • Run the registry validation in frontend CI

What is the Jira issue?

ZEPPELIN-6660

How should this be tested?

cd zeppelin-web-angular
npm run check:notebook-parity-scenarios

The command passes after rebasing on the latest origin/master: 15 validator tests pass and the checked-in registry matches its generated Markdown view.

The quick GitHub Actions workflow has passed. The frontend and core workflows are still running for the rebased commit.

Screenshots (if appropriate)

N/A

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? Yes. notebook-parity.md is the generated review document for the registry.

@tbonelee

tbonelee commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

A few suggestions.

1. Move the schema definition to a declarative form

validateRegistry is effectively the schema, and most of it (field types, enums, patterns, the per-status requirements) can be declared instead. Moving that to a JSON Schema file and validating with Ajv would leave only the rules that have to look at the outside world: path existence, git commit reachability, and the test() declaration check.

Adding $schema to the data file also surfaces errors in the editor while a contributor is editing, rather than only in CI. The status branching maps to if/then, or to discriminatedUnion if you prefer zod. With a schema file, schemaVersion becomes redundant with $schema.

2. Playwright tags instead of test titles

Putting the identifier in the title and matching it as a substring means routine title cleanups break the registry. Playwright here is 1.55.1, so tags are available:

test('should display notebook container with proper structure', { tag: '@NB-PARITY-001' }, async () => {});

3. Does the role axis need to be required on every scenario?

NB-PARITY-001 and 060 are allow for every role, so there is no permission dimension there. And 003 (entering edit mode) marks reader as deny while 010 and 011, which happen inside the same editor, mark it n/a, so "not relevant" and "should be denied" are mixed together. Would making the field optional, or requiring it only for area: "permission" scenarios, work better?

roleVerification also allows only unverified and not-applicable, so there is no value to record a permission test once one is written.

4. Duplicated strings that are not identifiers

Referencing scenarios by id is the right call, but the same principle is not applied one level down, so several values are copied verbatim.

  • uncoveredOutcomes repeats whole sentences from observableOutcomes. Could the outcomes carry ids and be referenced instead?
  • evidence points at tests on covered rows and at production sources on gap rows. 060 is a gap yet lists an existing spec as evidence, which makes it hard to tell whether that test covers the scenario. Splitting "where it is implemented" from "what demonstrates it" would let each side carry its own rule.
  • projects is a hand copy of test.skip(browserName !== 'chromium', …) in the spec, and it is not checked. Removing that skip leaves the registry stale and CI green.

5. Consistency with e2e/AGENTS.md

e2e/AGENTS.md:124 currently says "no cross-framework parity project in this config… do not build parity infrastructure ahead of need." If this PR is the decision to change that stance, could that paragraph be updated in the same PR? The convention that test titles must keep the identifier is not documented anywhere either, so a contributor following that file would not know why CI broke.

@voidmatcha

Copy link
Copy Markdown
Member Author

@tbonelee Thanks for the review. I addressed the suggestions:

  • Moved the registry structure to JSON Schema with Ajv
  • Replaced IDs in test titles with Playwright tags
  • Made role metadata optional and added the verified state
  • Added stable outcome IDs, split implementation and verification evidence, and removed duplicated browser project metadata
  • Updated e2e/AGENTS.md

I also hardened the validator and added regression coverage. All 21 notebook parity checks pass.

@voidmatcha
voidmatcha force-pushed the ZEPPELIN-6660-parity-scenarios branch from 6ad0f14 to fd4037c Compare September 6, 2026 02:31
@tbonelee
tbonelee merged commit 8328f6a into apache:master Sep 9, 2026
18 checks passed
@tbonelee

tbonelee commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Merged into master

voidmatcha pushed a commit that referenced this pull request Sep 13, 2026
### What is this PR for?

The Angular New UI declares `PARAGRAPH_APPEND_OUTPUT` and `PARAGRAPH_UPDATE_OUTPUT` in its WebSocket operation enum but does not consume either message. Interpreter output emitted while a paragraph is running
is therefore discarded until the terminal `PARAGRAPH` snapshot arrives.

This PR adds the missing consumer based on the server's actual wire contract. It declares the receive payloads in the SDK, handles both operations in `ParagraphBase`, and introduces `ParagraphOutputState` to fold UPDATE, APPEND, and terminal snapshots into the current paragraph result. APPEND data is accumulated by result index, APPEND received before a typed UPDATE is held until its type is known, and the terminal `PARAGRAPH` snapshot becomes authoritative so late frames cannot duplicate or overwrite the final result.

The PR also fixes a server-side ordering ambiguity. APPEND events were buffered for up to 100 ms by `AppendOutputRunner`, while UPDATE events bypassed that queue and could overtake an earlier APPEND. A client
cannot distinguish that delayed APPEND from one genuinely produced after the UPDATE. APPEND and UPDATE now share the same queue, with UPDATE acting as an ordering boundary: preceding APPEND chunks are flushed
before the UPDATE, and subsequent APPEND chunks remain after it.

A focused, versioned capture records the callback-order evidence and observed WebSocket sequences with paragraph streaming enabled and disabled. Reducer tests replay the capture and cover delayed-frame permutations. The client remains defensive against late frames for compatibility with older servers.

The change is limited to the standard paragraph result-rendering path. Application output rendering is unchanged.

### What type of PR is it?

Bug Fix

### Todos

* [x] Declare the APPEND and UPDATE receive payloads and their type asymmetry
* [x] Consume streaming paragraph output in the Angular New UI
* [x] Preserve APPEND and UPDATE ordering on the server
* [x] Cover coalesced, reordered, and late output events
* [x] Record and replay enabled and disabled streaming captures
* [x] Add browser coverage for output accumulation while RUNNING
* [x] Add the post-fix streaming scenario to the notebook parity registry after #5456 lands

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-6659

The reusable WebSocket fixture infrastructure tracked by ZEPPELIN-6665 and ZEPPELIN-6671 is not available yet, so this PR includes the focused capture and ordering replay required by ZEPPELIN-6659.

The notebook parity registry is being introduced by ZEPPELIN-6660 in #5456. After that PR lands, this change will register streaming output as a separate result scenario. The scenario will require the first chunk to be visible while the paragraph is RUNNING, later chunks to accumulate rather than replace earlier output, and the terminal result to contain every chunk exactly once.

### How should this be tested?

* Run the server ordering regression test:

```bash
./mvnw test -pl zeppelin-server -Dtest=AppendOutputRunnerTest
```

* Run the frontend reducer and SDK contract tests:

```bash
cd zeppelin-web-angular
npm run test:shell -- src/app/core/paragraph-base/paragraph-output-state.spec.ts projects/zeppelin-sdk/src/interfaces/message-data-type-map.interface.spec.ts
```

* Validate the WebSocket operation contract:

```bash
npm run check:websocket-contract
```

The browser test runs a shell paragraph that prints three chunks separated by 3 and 5 seconds. It verifies that `first` is visible while the paragraph is RUNNING, `second` is appended while the paragraph
remains RUNNING, and the FINISHED result contains `first`, `second`, and `third`.

The capture replay additionally verifies coalesced APPEND chunks, APPEND before a typed UPDATE, UPDATE overtaking a queued APPEND, APPEND after the terminal `PARAGRAPH`, and terminal fallback when `zeppelin.websocket.paragraph_status_progress.enable=false`.

### Questions:

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

Closes #5460 from miinhho/fix/streaming-interpreter-output.

Signed-off-by: YONGJAE LEE <dev.yongjaelee@gmail.com>
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