-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ECO] Use new Entity v2 endpoints in Inventory #203452
[ECO] Use new Entity v2 endpoints in Inventory #203452
Conversation
/ci |
/ci |
# Conflicts: # x-pack/plugins/observability_solution/inventory/server/routes/entities/route.ts
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
Hey @iblancof, I took a look at the points that were not working:
Error on Kubernetes Clusters entity detail ✅
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀 It works as expected :)
🔽 Just some nits
...utions/observability/plugins/inventory/server/routes/entities/get_group_by_terms_agg.test.ts
Outdated
Show resolved
Hide resolved
...utions/observability/plugins/inventory/server/routes/entities/get_group_by_terms_agg.test.ts
Outdated
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/inventory/server/routes/entities/route.ts
Outdated
Show resolved
Hide resolved
...rm/plugins/shared/entity_manager/server/lib/v2/definitions/identity_fields_by_source.test.ts
Outdated
Show resolved
Hide resolved
...solutions/observability/plugins/inventory/public/components/entity_group_accordion/index.tsx
Outdated
Show resolved
Hide resolved
...s/observability/plugins/inventory/public/components/search_bar/entity_types_multi_select.tsx
Outdated
Show resolved
Hide resolved
Hi @rmyz, thanks for the update! Missing alerts
Got the alerts now, nice! 🚀 Old entities index in request present
I don't see the requests anymore but it seems the search got broken.
The request seems to be made to Error on Kubernetes Clusters entity detail
I did not try it, but that makes sense, thanks! |
Thanks again for testing it @iblancof
This is expected, by how the whole flow is built, we first query the entity types, then the entities according to those types, in any case, if we query something that's exclusively for one entity, we would only get that entity type and get the entity once we open the dropdown.
I'm currently investigating this, no changes were made to the search component, so this may be broken for some time. |
I found the issue @iblancof, we are using a wrong dataView, causing the search component to not show filter suggestions. As the whole Inventory (also search) cannot be used because it's currently broken (EEM did their changes, which are not compatible with what we have) until we merge this PR, we will fix the search in #204026. |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
History
cc @rmyz |
Thanks for all the updates @rmyz! |
Starting backport for target branches: 8.x |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
## Summary Closes elastic#202295 Closes elastic#202296 This PR adapts Inventory to use the new Entity v2 endpoints. ## Testing - Use any synthtrace scenario that loads service/hosts/containers data - Navigate and make sure everything works as expected (navigation to Discovery/Infra/Services pages, interacting with the table, searching for some specific entity, interacting with the type filter) - To check the alerts work, it's easier to connect to a remote cluster. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Jenny <[email protected]>
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
## Summary Closes elastic#202295 Closes elastic#202296 This PR adapts Inventory to use the new Entity v2 endpoints. ## Testing - Use any synthtrace scenario that loads service/hosts/containers data - Navigate and make sure everything works as expected (navigation to Discovery/Infra/Services pages, interacting with the table, searching for some specific entity, interacting with the type filter) - To check the alerts work, it's easier to connect to a remote cluster. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Jenny <[email protected]> (cherry picked from commit eb919c9) # Conflicts: # x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_group_by_terms_agg.test.ts # x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_group_by_terms_agg.ts # x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_latest_entities_alerts.ts # x-pack/solutions/observability/plugins/inventory/server/routes/entities/route.ts
#205534) Closes #203095 Closes #204263 ## Summary This PR removes the page for the enabling functionality and welcome screen. After the migration to v2 API we don't need to enable it anymore as we are not using transforms ### Before: ![image](https://github.com/user-attachments/assets/0c8d5841-9189-4551-a1be-87801cfcf57d) ![image](https://github.com/user-attachments/assets/75a73dd8-6b16-452b-abcf-41e1fcca6645) ### After: The same without the extra step to enable the entities and the welcome screen: - No data: ![image](https://github.com/user-attachments/assets/dbfdf501-36e7-4b6f-a8b6-ed0a6748ab62) - With data: ![image](https://github.com/user-attachments/assets/0bbb2983-4e0a-477c-ac11-d2256b5ff854) ## Testing - In a local environment enable the entities feature flag ( it should be a clean env as the entities should not be enabled before ): <img width="1911" alt="image" src="https://github.com/user-attachments/assets/75d6f77d-5039-41ca-80ca-34c3bf99844e" /> - Go to Inventory - Check before and after ingesting data - Synthtrace: `node scripts/synthtrace logs_traces_hosts.ts` - ~⚠️ this case can't be checked before #203452 is merged~ - #203452 is merged 🎉
elastic#205534) Closes elastic#203095 Closes elastic#204263 ## Summary This PR removes the page for the enabling functionality and welcome screen. After the migration to v2 API we don't need to enable it anymore as we are not using transforms ### Before: ![image](https://github.com/user-attachments/assets/0c8d5841-9189-4551-a1be-87801cfcf57d) ![image](https://github.com/user-attachments/assets/75a73dd8-6b16-452b-abcf-41e1fcca6645) ### After: The same without the extra step to enable the entities and the welcome screen: - No data: ![image](https://github.com/user-attachments/assets/dbfdf501-36e7-4b6f-a8b6-ed0a6748ab62) - With data: ![image](https://github.com/user-attachments/assets/0bbb2983-4e0a-477c-ac11-d2256b5ff854) ## Testing - In a local environment enable the entities feature flag ( it should be a clean env as the entities should not be enabled before ): <img width="1911" alt="image" src="https://github.com/user-attachments/assets/75d6f77d-5039-41ca-80ca-34c3bf99844e" /> - Go to Inventory - Check before and after ingesting data - Synthtrace: `node scripts/synthtrace logs_traces_hosts.ts` - ~⚠️ this case can't be checked before elastic#203452 is merged~ - elastic#203452 is merged 🎉 (cherry picked from commit d6e28f7)
…y model (#205534) (#205958) # Backport This will backport the following commits from `main` to `8.x`: - [[ECO][Inventory v2] Remove the landing page to enable the entity model (#205534)](#205534) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"jennypavlova","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-08T19:30:17Z","message":"[ECO][Inventory v2] Remove the landing page to enable the entity model (#205534)\n\nCloses #203095\r\nCloses https://github.com/elastic/kibana/issues/204263\r\n\r\n\r\n## Summary\r\n\r\nThis PR removes the page for the enabling functionality and welcome\r\nscreen. After the migration to v2 API we don't need to enable it anymore\r\nas we are not using transforms\r\n\r\n### Before: \r\n\r\n\r\n![image](https://github.com/user-attachments/assets/0c8d5841-9189-4551-a1be-87801cfcf57d)\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/75a73dd8-6b16-452b-abcf-41e1fcca6645)\r\n\r\n### After: \r\nThe same without the extra step to enable the entities and the welcome\r\nscreen:\r\n- No data: \r\n\r\n![image](https://github.com/user-attachments/assets/dbfdf501-36e7-4b6f-a8b6-ed0a6748ab62)\r\n\r\n- With data:\r\n\r\n![image](https://github.com/user-attachments/assets/0bbb2983-4e0a-477c-ac11-d2256b5ff854)\r\n\r\n## Testing\r\n\r\n- In a local environment enable the entities feature flag ( it should be\r\na clean env as the entities should not be enabled before ):\r\n<img width=\"1911\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/75d6f77d-5039-41ca-80ca-34c3bf99844e\"\r\n/>\r\n\r\n- Go to Inventory \r\n- Check before and after ingesting data\r\n- Synthtrace: `node scripts/synthtrace logs_traces_hosts.ts` - ~⚠️ this\r\ncase can't be checked before\r\nhttps://github.com//pull/203452 is merged~ -\r\nhttps://github.com//pull/203452 is merged 🎉","sha":"d6e28f766ac5363b4a6888871a2813538a4ee367","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-ux-infra_services"],"title":"[ECO][Inventory v2] Remove the landing page to enable the entity model","number":205534,"url":"https://github.com/elastic/kibana/pull/205534","mergeCommit":{"message":"[ECO][Inventory v2] Remove the landing page to enable the entity model (#205534)\n\nCloses #203095\r\nCloses https://github.com/elastic/kibana/issues/204263\r\n\r\n\r\n## Summary\r\n\r\nThis PR removes the page for the enabling functionality and welcome\r\nscreen. After the migration to v2 API we don't need to enable it anymore\r\nas we are not using transforms\r\n\r\n### Before: \r\n\r\n\r\n![image](https://github.com/user-attachments/assets/0c8d5841-9189-4551-a1be-87801cfcf57d)\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/75a73dd8-6b16-452b-abcf-41e1fcca6645)\r\n\r\n### After: \r\nThe same without the extra step to enable the entities and the welcome\r\nscreen:\r\n- No data: \r\n\r\n![image](https://github.com/user-attachments/assets/dbfdf501-36e7-4b6f-a8b6-ed0a6748ab62)\r\n\r\n- With data:\r\n\r\n![image](https://github.com/user-attachments/assets/0bbb2983-4e0a-477c-ac11-d2256b5ff854)\r\n\r\n## Testing\r\n\r\n- In a local environment enable the entities feature flag ( it should be\r\na clean env as the entities should not be enabled before ):\r\n<img width=\"1911\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/75d6f77d-5039-41ca-80ca-34c3bf99844e\"\r\n/>\r\n\r\n- Go to Inventory \r\n- Check before and after ingesting data\r\n- Synthtrace: `node scripts/synthtrace logs_traces_hosts.ts` - ~⚠️ this\r\ncase can't be checked before\r\nhttps://github.com//pull/203452 is merged~ -\r\nhttps://github.com//pull/203452 is merged 🎉","sha":"d6e28f766ac5363b4a6888871a2813538a4ee367"}},"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/205534","number":205534,"mergeCommit":{"message":"[ECO][Inventory v2] Remove the landing page to enable the entity model (#205534)\n\nCloses #203095\r\nCloses https://github.com/elastic/kibana/issues/204263\r\n\r\n\r\n## Summary\r\n\r\nThis PR removes the page for the enabling functionality and welcome\r\nscreen. After the migration to v2 API we don't need to enable it anymore\r\nas we are not using transforms\r\n\r\n### Before: \r\n\r\n\r\n![image](https://github.com/user-attachments/assets/0c8d5841-9189-4551-a1be-87801cfcf57d)\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/75a73dd8-6b16-452b-abcf-41e1fcca6645)\r\n\r\n### After: \r\nThe same without the extra step to enable the entities and the welcome\r\nscreen:\r\n- No data: \r\n\r\n![image](https://github.com/user-attachments/assets/dbfdf501-36e7-4b6f-a8b6-ed0a6748ab62)\r\n\r\n- With data:\r\n\r\n![image](https://github.com/user-attachments/assets/0bbb2983-4e0a-477c-ac11-d2256b5ff854)\r\n\r\n## Testing\r\n\r\n- In a local environment enable the entities feature flag ( it should be\r\na clean env as the entities should not be enabled before ):\r\n<img width=\"1911\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/75d6f77d-5039-41ca-80ca-34c3bf99844e\"\r\n/>\r\n\r\n- Go to Inventory \r\n- Check before and after ingesting data\r\n- Synthtrace: `node scripts/synthtrace logs_traces_hosts.ts` - ~⚠️ this\r\ncase can't be checked before\r\nhttps://github.com//pull/203452 is merged~ -\r\nhttps://github.com//pull/203452 is merged 🎉","sha":"d6e28f766ac5363b4a6888871a2813538a4ee367"}}]}] BACKPORT--> Co-authored-by: jennypavlova <[email protected]>
Summary
Closes #202295
Closes #202296
This PR adapts Inventory to use the new Entity v2 endpoints.
Testing