Skip to content
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

[Inventory] Change discover link to use entity definition #201433

Conversation

jennypavlova
Copy link
Member

@jennypavlova jennypavlova commented Nov 22, 2024

Closes #200595

Summary

This PR changes the link to discover:

  • Pass a different data view (using the entity definition indices)
  • from Open in Discover to Explore in Discover

Testing

  • To have the test data I used metricbeat (for the host entity) and synthtrace (for the other entities type)
  • Open the inventory page and expand an entity type
  • Click on the ... in the actions column
  • Click on Explore in Discover

The results should be filtered by the selected entity and the dataview should include the indices from the entity definition:

no_filter_discover_link.mov
k8s_discover_link.mov

With service type filter (should not persist)

service_filter_discover_link.mov

@jennypavlova jennypavlova added the Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team label Nov 22, 2024
@jennypavlova jennypavlova self-assigned this Nov 22, 2024
@jennypavlova jennypavlova marked this pull request as ready for review November 25, 2024 15:51
@jennypavlova jennypavlova requested review from a team as code owners November 25, 2024 15:51
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@jennypavlova jennypavlova added release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) backport:version Backport to applied version labels v8.17.0 labels Nov 25, 2024
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Nov 25, 2024
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@jennypavlova jennypavlova changed the title [WIP][Inventory] Change discover link to use entity definition [Inventory] Change discover link to use entity definition Nov 25, 2024
Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jennypavlova jennypavlova requested a review from a team as a code owner November 27, 2024 02:43
@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 27, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: e11c62c
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-201433-e11c62c91821

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #58 / home app Welcome interstitial clicking on "Explore on my own" redirects to the "home" page

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
inventory 284 285 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
entityManager 35 37 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 3.4MB 3.4MB +338.0B
inventory 236.5KB 236.8KB +296.0B
observabilityOnboarding 271.5KB 272.2KB +676.0B
ux 167.4KB 167.7KB +338.0B
total +1.6KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
entityManager 2 3 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
entityManager 7.3KB 8.0KB +645.0B
inventory 12.1KB 12.4KB +338.0B
observabilityAIAssistant 47.0KB 47.3KB +338.0B
slo 28.5KB 28.8KB +338.0B
streams 5.5KB 5.8KB +338.0B
total +2.0KB
Unknown metric groups

API count

id before after diff
entityManager 35 37 +2

History

cc @jennypavlova

@jennypavlova jennypavlova merged commit afc5e51 into elastic:main Nov 28, 2024
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.17, 8.x

https://github.com/elastic/kibana/actions/runs/12068240183

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 28, 2024
…1433)

Closes elastic#200595

## Summary

This PR changes the link to discover:
- Pass a different data view (using the entity definition indices)
- from Open in Discover to Explore in Discover

## Testing

- To have the test data I used metricbeat (for the host entity) and
synthtrace (for the other entities type)
- Open the inventory page and expand an entity type
- Click on the `...` in the actions column
- Click on `Explore in Discover`

The results should be filtered by the selected entity and the dataview
should include the indices from the entity definition:

https://github.com/user-attachments/assets/29bb46b4-719e-4874-b1aa-056ac28d234a

https://github.com/user-attachments/assets/36c08b8b-f507-445e-a7b5-8eb1176beb90

With service type filter (should not persist)

https://github.com/user-attachments/assets/ae6ef28a-e55a-4a32-9128-802ebea25607

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit afc5e51)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 28, 2024
…1433)

Closes elastic#200595

## Summary

This PR changes the link to discover:
- Pass a different data view (using the entity definition indices)
- from Open in Discover to Explore in Discover

## Testing

- To have the test data I used metricbeat (for the host entity) and
synthtrace (for the other entities type)
- Open the inventory page and expand an entity type
- Click on the `...` in the actions column
- Click on `Explore in Discover`

The results should be filtered by the selected entity and the dataview
should include the indices from the entity definition:

https://github.com/user-attachments/assets/29bb46b4-719e-4874-b1aa-056ac28d234a

https://github.com/user-attachments/assets/36c08b8b-f507-445e-a7b5-8eb1176beb90

With service type filter (should not persist)

https://github.com/user-attachments/assets/ae6ef28a-e55a-4a32-9128-802ebea25607

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit afc5e51)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.17
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 29, 2024
kibanamachine added a commit that referenced this pull request Nov 29, 2024
) (#202154)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Inventory] Change discover link to use entity definition
(#201433)](#201433)

<!--- 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":"2024-11-28T11:44:20Z","message":"[Inventory]
Change discover link to use entity definition (#201433)\n\nCloses
#200595 \r\n\r\n## Summary\r\n\r\nThis PR changes the link to discover:
\r\n- Pass a different data view (using the entity definition
indices)\r\n- from Open in Discover to Explore in Discover\r\n\r\n##
Testing\r\n\r\n- To have the test data I used metricbeat (for the host
entity) and\r\nsynthtrace (for the other entities type)\r\n- Open the
inventory page and expand an entity type\r\n- Click on the `...` in the
actions column\r\n- Click on `Explore in Discover`\r\n\r\nThe results
should be filtered by the selected entity and the dataview\r\nshould
include the indices from the entity
definition:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/29bb46b4-719e-4874-b1aa-056ac28d234a\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/36c08b8b-f507-445e-a7b5-8eb1176beb90\r\n\r\n\r\nWith
service type filter (should not
persist)\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ae6ef28a-e55a-4a32-9128-802ebea25607\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"afc5e51e296eb499a17ad82de560d20c352cd2a9","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","ci:project-deploy-observability","Team:obs-ux-infra_services","backport:version","v8.17.0"],"title":"[Inventory]
Change discover link to use entity
definition","number":201433,"url":"https://github.com/elastic/kibana/pull/201433","mergeCommit":{"message":"[Inventory]
Change discover link to use entity definition (#201433)\n\nCloses
#200595 \r\n\r\n## Summary\r\n\r\nThis PR changes the link to discover:
\r\n- Pass a different data view (using the entity definition
indices)\r\n- from Open in Discover to Explore in Discover\r\n\r\n##
Testing\r\n\r\n- To have the test data I used metricbeat (for the host
entity) and\r\nsynthtrace (for the other entities type)\r\n- Open the
inventory page and expand an entity type\r\n- Click on the `...` in the
actions column\r\n- Click on `Explore in Discover`\r\n\r\nThe results
should be filtered by the selected entity and the dataview\r\nshould
include the indices from the entity
definition:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/29bb46b4-719e-4874-b1aa-056ac28d234a\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/36c08b8b-f507-445e-a7b5-8eb1176beb90\r\n\r\n\r\nWith
service type filter (should not
persist)\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ae6ef28a-e55a-4a32-9128-802ebea25607\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"afc5e51e296eb499a17ad82de560d20c352cd2a9"}},"sourceBranch":"main","suggestedTargetBranches":["8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201433","number":201433,"mergeCommit":{"message":"[Inventory]
Change discover link to use entity definition (#201433)\n\nCloses
#200595 \r\n\r\n## Summary\r\n\r\nThis PR changes the link to discover:
\r\n- Pass a different data view (using the entity definition
indices)\r\n- from Open in Discover to Explore in Discover\r\n\r\n##
Testing\r\n\r\n- To have the test data I used metricbeat (for the host
entity) and\r\nsynthtrace (for the other entities type)\r\n- Open the
inventory page and expand an entity type\r\n- Click on the `...` in the
actions column\r\n- Click on `Explore in Discover`\r\n\r\nThe results
should be filtered by the selected entity and the dataview\r\nshould
include the indices from the entity
definition:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/29bb46b4-719e-4874-b1aa-056ac28d234a\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/36c08b8b-f507-445e-a7b5-8eb1176beb90\r\n\r\n\r\nWith
service type filter (should not
persist)\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ae6ef28a-e55a-4a32-9128-802ebea25607\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"afc5e51e296eb499a17ad82de560d20c352cd2a9"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: jennypavlova <[email protected]>
kibanamachine added a commit that referenced this pull request Nov 29, 2024
…1433) (#202153)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Inventory] Change discover link to use entity definition
(#201433)](#201433)

<!--- 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":"2024-11-28T11:44:20Z","message":"[Inventory]
Change discover link to use entity definition (#201433)\n\nCloses
#200595 \r\n\r\n## Summary\r\n\r\nThis PR changes the link to discover:
\r\n- Pass a different data view (using the entity definition
indices)\r\n- from Open in Discover to Explore in Discover\r\n\r\n##
Testing\r\n\r\n- To have the test data I used metricbeat (for the host
entity) and\r\nsynthtrace (for the other entities type)\r\n- Open the
inventory page and expand an entity type\r\n- Click on the `...` in the
actions column\r\n- Click on `Explore in Discover`\r\n\r\nThe results
should be filtered by the selected entity and the dataview\r\nshould
include the indices from the entity
definition:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/29bb46b4-719e-4874-b1aa-056ac28d234a\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/36c08b8b-f507-445e-a7b5-8eb1176beb90\r\n\r\n\r\nWith
service type filter (should not
persist)\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ae6ef28a-e55a-4a32-9128-802ebea25607\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"afc5e51e296eb499a17ad82de560d20c352cd2a9","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","ci:project-deploy-observability","Team:obs-ux-infra_services","backport:version","v8.17.0"],"title":"[Inventory]
Change discover link to use entity
definition","number":201433,"url":"https://github.com/elastic/kibana/pull/201433","mergeCommit":{"message":"[Inventory]
Change discover link to use entity definition (#201433)\n\nCloses
#200595 \r\n\r\n## Summary\r\n\r\nThis PR changes the link to discover:
\r\n- Pass a different data view (using the entity definition
indices)\r\n- from Open in Discover to Explore in Discover\r\n\r\n##
Testing\r\n\r\n- To have the test data I used metricbeat (for the host
entity) and\r\nsynthtrace (for the other entities type)\r\n- Open the
inventory page and expand an entity type\r\n- Click on the `...` in the
actions column\r\n- Click on `Explore in Discover`\r\n\r\nThe results
should be filtered by the selected entity and the dataview\r\nshould
include the indices from the entity
definition:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/29bb46b4-719e-4874-b1aa-056ac28d234a\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/36c08b8b-f507-445e-a7b5-8eb1176beb90\r\n\r\n\r\nWith
service type filter (should not
persist)\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ae6ef28a-e55a-4a32-9128-802ebea25607\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"afc5e51e296eb499a17ad82de560d20c352cd2a9"}},"sourceBranch":"main","suggestedTargetBranches":["8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201433","number":201433,"mergeCommit":{"message":"[Inventory]
Change discover link to use entity definition (#201433)\n\nCloses
#200595 \r\n\r\n## Summary\r\n\r\nThis PR changes the link to discover:
\r\n- Pass a different data view (using the entity definition
indices)\r\n- from Open in Discover to Explore in Discover\r\n\r\n##
Testing\r\n\r\n- To have the test data I used metricbeat (for the host
entity) and\r\nsynthtrace (for the other entities type)\r\n- Open the
inventory page and expand an entity type\r\n- Click on the `...` in the
actions column\r\n- Click on `Explore in Discover`\r\n\r\nThe results
should be filtered by the selected entity and the dataview\r\nshould
include the indices from the entity
definition:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/29bb46b4-719e-4874-b1aa-056ac28d234a\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/36c08b8b-f507-445e-a7b5-8eb1176beb90\r\n\r\n\r\nWith
service type filter (should not
persist)\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ae6ef28a-e55a-4a32-9128-802ebea25607\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"afc5e51e296eb499a17ad82de560d20c352cd2a9"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: jennypavlova <[email protected]>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 29, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
…1433)

Closes elastic#200595 

## Summary

This PR changes the link to discover: 
- Pass a different data view (using the entity definition indices)
- from Open in Discover to Explore in Discover

## Testing

- To have the test data I used metricbeat (for the host entity) and
synthtrace (for the other entities type)
- Open the inventory page and expand an entity type
- Click on the `...` in the actions column
- Click on `Explore in Discover`

The results should be filtered by the selected entity and the dataview
should include the indices from the entity definition:


https://github.com/user-attachments/assets/29bb46b4-719e-4874-b1aa-056ac28d234a



https://github.com/user-attachments/assets/36c08b8b-f507-445e-a7b5-8eb1176beb90


With service type filter (should not persist)


https://github.com/user-attachments/assets/ae6ef28a-e55a-4a32-9128-802ebea25607

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) backport:version Backport to applied version labels ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.17.0 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Inventory] Open in Discover link should use indices from entity definition
5 participants