Skip to content

[ZEPPELIN-6645] Handle empty interpreter settings in note creation - #5599

Merged
voidmatcha merged 1 commit into
apache:masterfrom
miinhho:ZEPPELIN-6645-empty-interpreter-settings
Nov 1, 2026
Merged

voidmatcha merged 1 commit into
apache:masterfrom
miinhho:ZEPPELIN-6645-empty-interpreter-settings

Conversation

@miinhho

@miinhho miinhho commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

What is this PR for?

The server filters interpreter settings by the current user's permissions, so an empty list is a valid response. The New Note and Clone Note dialogs share a handler that unconditionally reads the first setting's name, causing a TypeError when no settings are available.

Use optional chaining to leave the default interpreter unset for an empty response while preserving first-setting selection for nonempty responses. An empty response also clears any previous selection and allows change detection to complete.

Add component tests for interpreter selection transitions and existing new/clone note naming behavior.

What type of PR is it?

Bug Fix

Todos

  • Handle an empty interpreter settings response.
  • Add regression tests and existing note naming coverage.
  • Verify component tests and browser modal behavior.

What is the Jira issue?

How should this be tested?

From zeppelin-web-angular:

npm run test:shell -- src/app/share/note-create/note-create.component.spec.ts

All 9 component tests pass. Coverage includes:

  • Empty and nonempty interpreter lists.
  • Selection clearing and recovery across responses.
  • New note naming at root and nested paths.
  • Maximum note numbering and clone numbering.
  • Literal handling of regex metacharacters in source names.

For server-backed reproduction:

  1. Configure permissions on all interpreter settings so a test user is authorized for none.
  2. As that user, open New Note and Clone Note for a readable note.
  3. Confirm neither dialog reports the TypeError and New Note leaves the default interpreter unset.
  4. Check normal first-interpreter selection with an authorized user.

Questions:

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

@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 👍

@voidmatcha
voidmatcha merged commit 237b067 into apache:master Nov 1, 2026
24 checks passed
@voidmatcha

Copy link
Copy Markdown
Member

Merged into master (237b067).

@miinhho
miinhho deleted the ZEPPELIN-6645-empty-interpreter-settings branch November 1, 2026 09:26
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