Skip to content

[ZEPPELIN-6707] Preserve pending repository values during concurrent saves - #5596

Open
miinhho wants to merge 1 commit into
apache:masterfrom
miinhho:ZEPPELIN-6707-repo-save-refetch
Open

miinhho wants to merge 1 commit into
apache:masterfrom
miinhho:ZEPPELIN-6707-repo-save-refetch

Conversation

@miinhho

@miinhho miinhho commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

What is this PR for?

When two repository cards save concurrently, the first save can refresh the entire list before the second save finishes. The second card then briefly shows its old server value, replacing the submitted value until its own refresh completes.

This change keeps each card’s submitted values visible until the host confirms its save with a subsequent fetch. The host returns a versioned repository snapshot through the save callback, so React can distinguish save completion from an unrelated list refresh and ignore older responses.

The confirming server values are accepted even when they differ from the submission, preserving support for path normalization and repositories whose settings updates are no-ops.

What type of PR is it?

Bug Fix

What is the Jira issue?

How should this be tested?

Run the unit tests from zeppelin-web-angular:

npm run test:shell -- notebook-repos.component.spec.ts
npm run test:react -- NotebookRepoList.spec.tsx

These cover save/refetch ordering, pending values during unrelated refreshes, acceptance of different server values, and editing/Cancel behavior.

With the Zeppelin backend running on localhost:8080, run the browser regression test from the same directory:

npm run e2e:fast -- notebook-repos-concurrent-save.spec.ts

The Playwright configuration starts the frontend automatically. The test mocks repository API responses to control the concurrent saves:

  1. Hold B’s save request and verify that B displays its submitted value.
  2. Complete A’s save and refresh the list while B remains pending. Verify that B never returns to its old value, including temporarily.
  3. Complete B’s save and verify that it displays the confirming GET value, which deliberately differs from its submitted value.

Questions:

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

saves

Keep a repository's submitted values visible while its save is pending,
even when another repository's save refreshes the list.

Reconcile completed saves with post-save fetch snapshots and accept
server-confirmed values that differ from the submission.

Add unit and browser regression coverage for concurrent saves, missing
refetches, and temporary value regressions

@voidmatcha voidmatcha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍

This branch has not been deployed

No deployments
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