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

[inspector] clusters tab MVP #166025

Merged
merged 77 commits into from
Sep 27, 2023
Merged

[inspector] clusters tab MVP #166025

merged 77 commits into from
Sep 27, 2023

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Sep 7, 2023

Closes #166021
Closes #163381

This PR adds inspector cluster tab MVP

This PR does not:

  1. include all UI elements in design. These will be added at later dates.
  2. show clusters tab when request fails. Somewhere between kibana server elasticsearch request and the client, the raw response is getting removed for failed requests. This will have to be sorted out in a separate PR.
  3. Opening clusters tab from "incomplete data" warnings

Test setup

  1. Start remote elasticsearch by running: yarn es snapshot -E transport.port=9500 -E http.port=9201 -E path.data=../remote1
  2. Install sample data to remote cluster
    1. Add elasticsearch.hosts: ["http://localhost:9201"] to kibana.dev.yml. Note create config/kibana.dev.yml if one does not exist. kibana.dev.yml is not managed by git so it has to be created the first time you add values.
    2. run yarn start to start kibana process
    3. install sample web logs data set on home page
    4. install sample flight data set on home page
    5. stop kibana process
    6. remove elasticsearch.hosts from kibana.dev.yml
  3. Start local elasticsearch by running: yarn es snapshot -E path.data=../local1
  4. Start kibana
  5. Add remote cluster under "Stack management -> Remote clusters"
    1. Set Name to "remote1"
    2. Set Seed nodes to "localhost:9500"
    3. Enable Skip if unavailable
  6. install sample web logs data set
  7. install sample flights data set
  8. Create data view.
    1. Set Index pattern to kibana_sample_data*,remote1:kibana_sample_data*
    2. Set Time field to timestamp

Local cluster (status=successful)

  1. Open discover
  2. Select "Kibana sample data logs" data view
  3. Open inspector
  4. Open clusters tab
    Screen Shot 2023-09-22 at 9 38 38 AM

Remote cluster (status=successful)

  1. Open discover
  2. Select "kibana_sample_data*,remote1:kibana_sample_data*" data view
  3. Open inspector
  4. Open clusters tab
    Screen Shot 2023-09-22 at 9 47 08 AM

Remote cluster (status=partial, failed shard)

  1. Open discover
  2. Select "kibana_sample_data*,remote1:kibana_sample_data*" data view
  3. Add filter
    {
      "error_query": {
        "indices": [
          {
            "error_type": "exception",
            "message": "local shard failure message 123",
            "name": "remote1:kibana_sample_data_logs",
            "shard_ids": [
              0
            ]
          }
        ]
      }
    }
    
  4. Open inspector
  5. Open clusters tab
    Screen Shot 2023-09-22 at 9 50 49 AM
    Screen Shot 2023-09-22 at 9 51 12 AM

Remote cluster (status=skipped, all shards fail)

  1. Open discover
  2. Select "kibana_sample_data*,remote1:kibana_sample_data*" data view
  3. Add filter
    {
      "error_query": {
        "indices": [
          {
            "error_type": "exception",
            "message": "local shard failure message 123",
            "name": "remote1:*",
            "shard_ids": [
              0
            ]
          }
        ]
      }
    }
    
  4. Open inspector
  5. Open clusters tab
    Screen Shot 2023-09-22 at 9 52 49 AM

Remote cluster (status=skipped, no remote)

  1. Open discover
  2. Kill process running remote1 elasticsearch
  3. Select "kibana_sample_data*,remote1:kibana_sample_data*" data view
  4. Open inspector
  5. Open clusters tab
    Screen Shot 2023-09-22 at 9 55 45 AM

@nreese nreese changed the title [inspector] show cluster details tab in inspector [inspector] clusters tab MVP Sep 22, 2023
@nreese nreese marked this pull request as ready for review September 22, 2023 16:17
@nreese nreese requested a review from a team as a code owner September 22, 2023 16:17
@nreese nreese added release_note:enhancement Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.11.0 labels Sep 22, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@nreese nreese added the Feature:Inspector Inspector infrastructure and implementations label Sep 22, 2023
@nreese
Copy link
Contributor Author

nreese commented Sep 22, 2023

@elasticmachine merge upstream

@nreese
Copy link
Contributor Author

nreese commented Sep 25, 2023

@elasticmachine merge upstream

@nreese
Copy link
Contributor Author

nreese commented Sep 25, 2023

@elasticmachine merge upstream

@ThomThomson ThomThomson self-requested a review September 26, 2023 19:18
Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Looked through the code, and followed the instructions for testing in Discover. I also did some testing in Dashboard and everything looks great.

Nice test coverage, and very clean code. Left a few very small nits. The only thing that could elevate this is some functional test coverge, but I assume we'll be adding CCS functional test coverage in the future.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
inspector 41 57 +16

Async chunks

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

id before after diff
inspector 16.2KB 26.4KB +10.3KB

Page load bundle

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

id before after diff
inspector 22.1KB 22.2KB +104.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@nreese nreese merged commit 7b3a8f8 into elastic:main Sep 27, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Inspector Inspector infrastructure and implementations release_note:enhancement Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[inspector] clusters tab MVP Handling of cross cluster search errors
5 participants