[eem] _search fixes + integration tests#203403
Conversation
|
Pinging @elastic/obs-entities (Team:obs-entities) |
miltonhultgren
left a comment
There was a problem hiding this comment.
Should we add some tests for filtering and additional metadata aggs?
x-pack/platform/plugins/shared/entity_manager/server/lib/v2/definitions/source_definition.ts
Show resolved
Hide resolved
x-pack/platform/plugins/shared/entity_manager/server/lib/v2/queries/utils.test.ts
Show resolved
Hide resolved
x-pack/platform/plugins/shared/entity_manager/server/lib/v2/validate_fields.ts
Show resolved
Hide resolved
a bit noisy but added in 6f4ec6e |
There was a problem hiding this comment.
Nice, and here we see why it would be valuable for customers to add a field alias in this case instead but now we at least have tests for this 👍🏼
pheyos
left a comment
There was a problem hiding this comment.
x-pack/test/tsconfig.json changes LGTM
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
cc @klacabane |
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/12293211636 |
- small refactor of _search code which is now resilient to source-level
failure. We now return `{ entities: EntityV2[], errors: string[] }`
where `errors` lists source failures while still collecting successful
sources in `entities`
- add integration tests
- fixes some issues in the merging logic uncovered by the tests
- change metadata aggregation from `VALUES` to `TOP 10` since the former
is in tech preview
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit b866e32)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [[eem] _search fixes + integration tests (#203403)](#203403) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kevin Lacabane","email":"kevin.lacabane@elastic.co"},"sourceCommit":{"committedDate":"2024-12-12T09:11:14Z","message":"[eem] _search fixes + integration tests (#203403)\n\n- small refactor of _search code which is now resilient to source-level\r\nfailure. We now return `{ entities: EntityV2[], errors: string[] }`\r\nwhere `errors` lists source failures while still collecting successful\r\nsources in `entities`\r\n- add integration tests\r\n- fixes some issues in the merging logic uncovered by the tests\r\n- change metadata aggregation from `VALUES` to `TOP 10` since the former\r\nis in tech preview\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"b866e3290d98556078b7f124495de6b8706d46bb","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:obs-entities"],"title":"[eem] _search fixes + integration tests","number":203403,"url":"https://github.com/elastic/kibana/pull/203403","mergeCommit":{"message":"[eem] _search fixes + integration tests (#203403)\n\n- small refactor of _search code which is now resilient to source-level\r\nfailure. We now return `{ entities: EntityV2[], errors: string[] }`\r\nwhere `errors` lists source failures while still collecting successful\r\nsources in `entities`\r\n- add integration tests\r\n- fixes some issues in the merging logic uncovered by the tests\r\n- change metadata aggregation from `VALUES` to `TOP 10` since the former\r\nis in tech preview\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"b866e3290d98556078b7f124495de6b8706d46bb"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203403","number":203403,"mergeCommit":{"message":"[eem] _search fixes + integration tests (#203403)\n\n- small refactor of _search code which is now resilient to source-level\r\nfailure. We now return `{ entities: EntityV2[], errors: string[] }`\r\nwhere `errors` lists source failures while still collecting successful\r\nsources in `entities`\r\n- add integration tests\r\n- fixes some issues in the merging logic uncovered by the tests\r\n- change metadata aggregation from `VALUES` to `TOP 10` since the former\r\nis in tech preview\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"b866e3290d98556078b7f124495de6b8706d46bb"}}]}] BACKPORT--> Co-authored-by: Kevin Lacabane <kevin.lacabane@elastic.co>
- small refactor of _search code which is now resilient to source-level
failure. We now return `{ entities: EntityV2[], errors: string[] }`
where `errors` lists source failures while still collecting successful
sources in `entities`
- add integration tests
- fixes some issues in the merging logic uncovered by the tests
- change metadata aggregation from `VALUES` to `TOP 10` since the former
is in tech preview
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
{ entities: EntityV2[], errors: string[] }whereerrorslists source failures while still collecting successful sources inentitiesVALUEStoTOP 10since the former is in tech preview