Repository navigation
[2.0] feat(search): add data_contract_search_index (#34304) - #35490
Khairajani wants to merge 1 commit into
Conversation
* feat(search): register data_contract_search_index mappings Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * feat(search): index data contracts via DataContractIndex Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(search): cover data contract indexing in DataContractResourceIT Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * feat(ingestion): map DataContract to data_contract_search_index Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * feat(ui): data contract search index and query builder fields Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(search): keep contract owners on result updates; drop all alias Recording a contract result PATCHed a copy fetched without owners and reviewers, so the reindex blanked them in every contract doc. Reload the relationship fields first. Keep the index out of the all alias: team and user asset lists and the domain, tag and data product pickers query all, where contracts would show with no link and be accepted as assets they cannot hold. Lowercase-normalize the entity and testSuite FQN keywords so the asset autocomplete matches mixed-case FQNs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Fix UI checkstyle * feat(ui): let a query builder caller allow removing its last condition The canvas hides the delete control on the last remaining rule, so a builder can never be emptied. Callers that handle an emptied builder themselves (the Collate Automator resets to its 'Add Condition' state) opt in with allowRemoveLastRule; every other builder keeps the default. * fix(ui): offer data contract conditions only on fields contracts populate A contract has no tags, tier, domains, data products, certification or service, so conditions on those common fields matched no contract and reported 0 assets. They are no longer offered while data contracts are selected, alone or alongside other asset types, the same rule that limits entity-specific fields to the ones every selected index shares. * test(ui): removing the last allowed rule emits an empty tree, mounting never does * feat(ui): let a builder preset draw the rule remove button as a plain button Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: Himanshu Khairajani <46777429+Khairajani@users.noreply.github.com> Co-authored-by: Khairajani <himanshukhairajani8@gmail.com> (cherry picked from commit 5377edd)
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved🟡 Medium risk · Adding a dedicated data-contract search index and result reindexing could produce stale or incomplete contract search results if indexing or updates misbehave. Backports the VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
This is for |
|



Backports #34304 to
2.0.Cherry-pick of
5377edd9209, with conflicts resolved for what2.0lacks:components/common/QueryBuilder/does not exist on2.0, so the opt-inallowRemoveLastRule/ plain-remove-button props have nothing to attach to.DataContractResourceIT: only this PR's two search tests (patchOwners_reindexesContract,addResult_keepsOwnersInSearchDoc) plussupportsSearchIndex = true; main's unrelated ODCS/SLA tests are left out.DataContractRepository:supportsSearch = trueadded without main'sContractSlaValidatorconstructor block.AdvancedSearchClassBase: kept2.0's@react-awesome-query-builder/antdimport,toLowerandEntityStatus; the lifecycle-stage mock from main is not carried into the test.Verification (on the 2.0 base):
DataContractIndexTest,DataContractIndexMappingTest,SearchIndexFactoryTest,EntityTypeNameTest: 327 tests, 0 failures.mvn spotless:applyproduced no changes. Jest, ESLint and the IT compile were not run locally, so CI covers them.No issue: #34304 merged without one, so this carries
skip-pr-checkslike the other 2.0 backports.🤖 Generated with Claude Code