Repository navigation
feat(personas): add server-side persona search endpoint - #30469
Conversation
✅ Playwright Results — workflow succeededValidated commit ✅ 770 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 3 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 53m 11s ⏱️ Max setup 2m 56s · max shard execution 18m 27s · max shard-job elapsed before upload 21m 34s · reporting 5s 🌐 195.13 requests/attempt · 2.51 app boots/UI scenario · 19.42% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
…esource persona_entity has no `deleted` column, so `/personas/search` cannot honour an `include` param. Declaring it meant searchInternal had to overwrite it to Include.ALL, which made `?include=deleted` silently return every persona and put a Persona-specific branch in the base class every entity resource inherits. Drop the param and pass `new ListFilter(null)` instead, which is what PersonaResource.list already does and which emits identical SQL: a null include falls through getIncludeCondition to an empty predicate. Reverts the shared EntityResource branch and the ListFilter.setInclude mutator, restoring include to constructor-only.
|
| ) | ||
| : personaList; | ||
| } else if (searchText) { | ||
| const results = await searchPersonas(searchText, PAGE_SIZE_LARGE); |
There was a problem hiding this comment.
Search truncates matching personas
When a query matches more than 50 personas, this call retrieves only the first page while searchPersonas fixes the offset at zero and discards the response's paging metadata, causing later matching personas to remain impossible to select.
Knowledge Base Used: OpenMetadata React UI
|
|
Code Review ✅ Approved 4 resolved / 4 findingsAdds a server-side persona search endpoint along with UI client integration and tests, addressing the multi-select selection loss, out-of-order response handling, and case-sensitive filtering findings. ✅ 4 resolved✅ Bug: Multi-select loses prior selections after server-side search
✅ Bug: Debounced search results can arrive out of order
✅ Bug: Local personaList filter is case-sensitive, unlike server search
✅ Quality: Undocumented
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source



Describe your changes:
Adds a server-side search endpoint for personas, mirroring the existing
GET /roles/search.Why
The persona picker (assign personas to a user) had no way to search server-side — clients fetch a page of personas and filter locally, which silently misses personas beyond the fetched page once a deployment has many. Roles and domains already have server-side search; personas did not.
Changes
PersonaResource: newGET /v1/personas/search?q=&fields=&limit=&offset=&include=. Thin wrapper over the sharedsearchInternal(DBnameFilterLIKE on name/displayName), identical shape toRoleResource.search.PersonaAPI.searchPersonas(query, limit)→GET /personas/search.PersonaResourceIT.test_searchPersonasEndpoint: name + displayName matches, name ordering, case-insensitivity, empty-result, offset pagination (no dupes), empty-query fallback, deleted-persona exclusion. MirrorsRoleResourceIT.PersonaAPI.test.ts: asserts the endpoint/params and that an empty query dropsq.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Greptile Summary
Adds a server-side persona search flow and integrates it into the persona picker.
/v1/personas/searchbackend endpoint with offset pagination.Confidence Score: 4/5
This PR is not yet safe to merge because persona searches with more than 50 matches still leave later matches unreachable.
The UI always requests offset zero and discards paging metadata, so the server-side search integration does not fully resolve the large-deployment picker failure.
Files Needing Attention: openmetadata-ui/src/main/resources/ui/src/components/MyData/Persona/PersonaSelectableList/PersonaSelectableList.component.tsx; openmetadata-ui/src/main/resources/ui/src/rest/PersonaAPI.ts
Important Files Changed
Sequence Diagram
Reviews (8): Last reviewed commit: "Merge branch 'main' into add-persona-sea..." | Re-trigger Greptile
Context used: