Commit 22ab9fe
* Fixes #32374: serve the reindex entity list from the index registry
The Search Indexing app's entity picker read a hardcoded `items.enum` in the
UI-local schema JSON, so it was a per-build snapshot of a runtime fact and had
drifted 15 entity types behind the index mapping registry. Selecting everything
in the dropdown was therefore not the same as selecting `all`, which the app
already expands from the registry.
It also could never be right for a distribution that registers extra indexes:
IndexMappingLoader merges elasticsearch/indexMapping.json plus
elasticsearch/collate/indexMapping.json from the classpath at startup, so no
enum baked into the UI bundle can express the reindexable set.
Add SearchRepository.getIndexedEntityTypes() as the one definition and have both
ReindexingOrchestrator.getAll() and a new GET /v1/search/entityTypes read it, so
the picker and `all` cannot drift. The UI drops the enum and fills it in
ApplicationsClassBase.importSchema, the single funnel AppDetails and AppInstall
share; a failed fetch leaves only "All" selectable plus an error toast rather
than breaking the whole form.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Address review: align authz with the page, fix the IT and the picker spec
manerow, on #32375:
- The endpoint was admin-or-bot while the page that calls it is not. SettingsRouter
renders AppDetails for `isAdminUser || hasViewPermissions(APPLICATION)` and
AppDetails fetches the schema on every mount, so a viewer holding ViewBasic or
ViewAll got a red 403 toast for a request they never triggered. Authorize on
APPLICATION/VIEW_BASIC instead, which is exactly the page's gate.
- The 403 assertion in SearchResourceIT would have been a 404: authorizeAdminOrBot
resolves the subject first, and SubjectCache.getUserContext falls back to
Entity.getEntityByName, which throws EntityNotFoundException for a user this
suite never creates. It could only pass on suite ordering. Pin the user in
@BeforeAll, as AppOperationPermissionsIT already does, and flip the assertion to
the case that now matters: an Application viewer gets 200.
- SearchIndexApplication.spec.ts would have broken. rc-tree-select filters on the
node value (treeNodeFilterProp defaults to 'value'), so typing "Table" leaves
`tableColumn` visible too, and rc-tree sets title="Table Column" on it;
getByTitle is substring by default, so the locator resolved to 2 nodes and
waitFor threw in strict mode. Made it exact.
The Playwright run on the first commit was green because the impact map never
selected this spec — the Settings/** entry picks no spec that opens an app config
form. Added a mapping for the application config forms so a change to the
schemas, the loader, or the endpoint that fills them selects it. That also puts
this PR in a full run, so the locator fix gets exercised.
Copilot:
- 'all' is now in the injected enum. The backend sentinel is not an index, so the
endpoint does not return it, but `default: ["all"]` has to validate against the
enum; TreeSelectWidget already filters it out of the child nodes. Pre-existing
inconsistency — the old hardcoded enum omitted it too — fixed while here. It
also makes the fetch-failure fallback `['all']` rather than empty.
- Reused SEARCH_INDEXING_APPLICATION from constants/explore.constants.ts instead of
a second copy. Its own `SortingField` import is type-only, so this pulls nothing
new into the bundle graph.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Fix the payLoadSize description, which was a copy of batchSize's
payLoadSize is a byte size — ReindexingConfiguration.DEFAULT_PAYLOAD_SIZE is
SearchClusterMetrics.DEFAULT_BULK_PAYLOAD_SIZE_BYTES — but its description was a
verbatim copy of batchSize's "Maximum number of events entities in a batch
(Default 100)", so the rendered app docs showed the wrong units and the wrong
default for it.
Collate's forked schema happened to carry the correct string; resyncing that doc
against this one in openmetadata-collate#6326 would have propagated the error
downstream instead. Fixing it here keeps both sides on one description.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Stub getIndexedEntityTypes in ReindexingOrchestratorTest
setupEntitiesExpandsAllAndCountTotalEntitiesSkipsUnsupportedTypes stubbed
searchRepository.getEntityIndexMap(), which setupEntities() no longer calls after
getAll() moved to getIndexedEntityTypes(). searchRepository is a Mockito mock, so
the new call returned Mockito's default empty Set, setupEntities() expanded "all"
to nothing, and the entities assertion failed.
Stub the method the code now calls. The IndexMapping mocks the old stub built were
only there to shape the map, so the import goes with them.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Lower the recorded no-positional-locator count to match the baseline
#32576 pruned one om-playwright/no-positional-locator entry out of
eslint-suppressions.json (1323 -> 1322) without lowering the number recorded in
corpus.test.mjs, so `the suppressions baseline matches its recorded state
exactly` fails on main and therefore on every branch merged with it:
+ actual 'om-playwright/no-positional-locator': 1322
- expected 'om-playwright/no-positional-locator': 1323
Both files here are byte-identical to main, so this is not a violation this
branch introduced or fixed — only the bookkeeping the pruning PR left behind.
Lowering it is what the assertion message asks for; `yarn lint:playwright` is
already clean at 0 errors, so there is nothing to prune.
* Do not constrain the entity enum when the list cannot be fetched
ApplicationConfiguration validates with @rjsf/validator-ajv8 against the stored
appConfiguration, so injecting `enum: ["all"]` on a failed fetch made a saved
`entities: ["table", ...]` fail validation — during a transient outage an admin
could not save the form at all, including edits to unrelated fields. Return the
schema untouched instead: the picker degrades to a plain list, but the stored
selection stays visible and editable. The toast still fires.
Also add the endpoint's own files to the impact-map entry. It listed
resources/apps/** and the searchIndex bundle but not the two files that actually
produce the list, so editing /v1/search/entityTypes or getIndexedEntityTypes()
would not have selected the picker spec — the exact gap the entry exists to close.
Both found by Copilot on a111a47.
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 4517d2b commit 22ab9fe
13 files changed
Lines changed: 289 additions & 125 deletions
File tree
- .github/playwright
- openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests
- openmetadata-service/src
- main/java/org/openmetadata/service
- apps/bundles/searchIndex
- resources/search
- search
- test/java/org/openmetadata/service/apps/bundles/searchIndex
- openmetadata-ui/src/main/resources/ui
- playwright/e2e/Pages
- public/locales/en-US/Applications
- src
- components/Settings/Applications/AppDetails
- jsons/applicationSchemas
- rest
- utils/ApplicationSchemas
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
366 | 386 | | |
367 | 387 | | |
368 | 388 | | |
| |||
Lines changed: 74 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
1985 | 1989 | | |
1986 | 1990 | | |
1987 | 1991 | | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
1988 | 2062 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
| 512 | + | |
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| |||
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
| |||
834 | 838 | | |
835 | 839 | | |
836 | 840 | | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
837 | 875 | | |
838 | 876 | | |
839 | 877 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
984 | 984 | | |
985 | 985 | | |
986 | 986 | | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
987 | 1001 | | |
988 | 1002 | | |
989 | 1003 | | |
| |||
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
316 | 315 | | |
317 | 316 | | |
318 | 317 | | |
319 | | - | |
320 | | - | |
321 | | - | |
| 318 | + | |
322 | 319 | | |
323 | 320 | | |
324 | 321 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
322 | 328 | | |
323 | 329 | | |
324 | 330 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
18 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
19 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
20 | 88 | | |
21 | 89 | | |
22 | 90 | | |
| |||
0 commit comments