Conversation
… as regex The New UI interpreter search compiled the raw query with `new RegExp(value, 'i')`. Incomplete metacharacters such as `(` or `[` threw an uncaught SyntaxError and left the list showing the previous results, and `.` matched every interpreter. Filter with a case-insensitive literal substring match instead, keeping the case-insensitive behavior from ZEPPELIN-6147.
Contributor
Author
|
The |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR for?
The New UI interpreter page filters settings by name as the user types, but
filterInterpreters()compiled the raw query withnew RegExp(value, 'i'). So the search box took regular-expression syntax:(,[,*or a trailing\threw an uncaughtSyntaxError: Invalid regular expression. The list was not updated, so it kept showing the results of the previous query..matched every interpreter, andsp.rkmatchedspark.This PR filters with a case-insensitive literal substring match (
name.toLowerCase().includes(query.toLowerCase())). That keeps the case-insensitive behavior ZEPPELIN-6147 added, which was the only reason theRegExpwas introduced. ZEPPELIN-6535 (#5320) fixed the same coercion in the Table visualization column filter. This is a separate code path.Checked in the browser before and after the change (
/#/interpreter, 22 settings, anonymous mode):(SyntaxError: ... /(/i: Unterminated group, list unchanged[,*,\SyntaxError, list left on the previous query's results.sp.rkspark/SPARKA note on scope.
InterpreterSettingManagerrejects new setting names outside^[-_a-zA-Z0-9]+$, and every bundled interpreter group fits that set. So in practice a metacharacter query now matches nothing, where before it threw or matched too much. The test fixtures stay inside that character set, so they do not rely on names the server would reject.What type of PR is it?
Bug Fix
Todos
RegExpInterpreterComponent.filterInterpretersWhat is the Jira issue?
ZEPPELIN-6581
How should this be tested?
Done:
cd zeppelin-web-angular && npm run test:shell -- src/app/pages/workspace/interpreter/: 8 passed. The new spec covers every acceptance criterion:(,[,*,.and\without throwing, literal matching, case-insensitive matching, and restoring the full list when the query is cleared.SyntaxError: Invalid regular expression, and 2 because.andsp.rkstill match as patterns. The 2 tests for existing behavior (case-insensitive matching, clearing) pass both before and after.npm run test:shell: 21 files, 139 tests passed.npm run lint: exit 0.interpreter.component.tshas onemember-orderingwarning about the constructor's position, and master has the same warning.ng serveand drove/#/interpreterwith Playwright, before and after. Results are in the table above. Typingsp(ar[k*one key at a time also produces no console errors. The other console errors and warnings on page load (codicon.ttfload failure,NG8107,NG0912) appear identically on master.Not done:
zeppelin-web-angular/AGENTS.mdit belongs in a unit test. The template and debounce wiring are unchanged.Screenshots (if appropriate)
N/A. The before/after table above records the browser run.
Questions:
RegExponly to make the search case-insensitive.🤖 Generated with Claude Code