[ZEPPELIN-6581] Match interpreter search queries literally instead of as regex #5503
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 496 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.371
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5503"
general
weight: 0.35
tbonelee
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:An incomplete metacharacter such as
(,[,or a trailing\threw an uncaughtSyntaxError: Invalid regular expression. The list was not updated, so it kept showing the results of the previous query.A valid metacharacter changed what matched.
.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):| Query | Before | After |
|---|---|---|
|
(|SyntaxError: ... /(/i: Unterminated group, list unchanged | 0 items, no error ||
[,,\|SyntaxError, list left on the previous query's results | 0 items, no error ||
.| all 22 | 0 items ||
sp.rk| 2 | 0 items ||
spark/SPARK| 2 | 2 || cleared | 22 | 22 |
A 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
[x] Match interpreter search queries literally instead of compiling them as a
RegExp[x] Add unit tests for
InterpreterComponent.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.Ran the same spec against the unfixed component. The 6 tests for this bug fail for the reason the issue describes: 4 with
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.Manual reproduction from the issue: ran a local Zeppelin server with
ng serveand drove/#/interpreterwith Playwright, before and after. Results are in the table above. Typingsp(ar[kone 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:
No Playwright e2e spec was added. The behavior is a pure filter function, so per
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:
Does the license files need to update? No. The new spec file has the ASF header.
Is there breaking changes for older versions? Only for anyone who relied on regular-expression syntax in the interpreter search box, which was never documented. ZEPPELIN-6147 introduced the
RegExponly to make the search case-insensitive.🤖 Generated with [Claude Code