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

[maps] display incomplete results warning in layer legend #171144

Merged
merged 21 commits into from
Nov 16, 2023

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Nov 13, 2023

Closes #170653
Closes #170654

PR updates Maps to display incomplete result warnings in layer legend (instead of displaying toast)

Test setup

  1. In console, run:
    PUT geo1
    {}
    
    PUT geo1/_mapping
    {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }
    
    PUT geo1/_doc/1
    {
      "location": "25,25"
    }
    
    PUT geo2
    {}
    
    PUT geo2/_mapping
    {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }
    
    PUT geo2/_doc/1
    {
      "location": "35,35"
    }
    
  2. Create geo* data view

Test vector tile request warning

"View details" button for vector tile requests is out of scope for this PR. Vector tile requests use _mvt API instead of _search API. As such, vector tile requests do not use search source or request inspector.

  1. create new map, add documents layer from geo* data view.
  2. add filter
    {
      "error_query": {
        "indices": [
          {
            "error_type": "exception",
            "message": "local shard failure message 123",
            "name": "geo2"
          }
        ]
      }
    }
    
    Screenshot 2023-11-13 at 2 08 06 PM

Test geojson incomplete results warning with single request

  1. create new map, add documents layer from geo* data view.
  2. Set scaling to "Limit results to 10000"
  3. add filter
    {
      "error_query": {
        "indices": [
          {
            "error_type": "exception",
            "message": "local shard failure message 123",
            "name": "geo2"
          }
        ]
      }
    }
    
    Screenshot 2023-11-13 at 2 11 48 PM

Test geojson incomplete results warning with multiple requests

  1. create new map, add documents layer from geo* data view.
  2. Set scaling to "Show clusters when results exceed 10000"
  3. add filter
    {
      "error_query": {
        "indices": [
          {
            "error_type": "exception",
            "message": "local shard failure message 123",
            "name": "geo2"
          }
        ]
      }
    }
    
    Screenshot 2023-11-13 at 2 12 57 PM

@nreese nreese changed the title Issue 170653 [maps] display incomplete results warning in layer legend Nov 13, 2023
@nreese
Copy link
Contributor Author

nreese commented Nov 14, 2023

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
maps 1066 1093 +27

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
@kbn/search-response-warnings 12 18 +6

Async chunks

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

id before after diff
discover 590.3KB 590.3KB +4.0B
maps 2.9MB 2.9MB -19.1KB
visualizations 268.0KB 268.1KB +4.0B
total -19.1KB

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
maps 29 28 -1

Page load bundle

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

id before after diff
maps 46.7KB 46.7KB +63.0B
Unknown metric groups

API count

id before after diff
@kbn/search-response-warnings 14 20 +6

History

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

@nreese nreese marked this pull request as ready for review November 15, 2023 14:57
@nreese nreese requested review from a team as code owners November 15, 2023 14:57
@nreese nreese added release_note:enhancement Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Feature:Maps labels Nov 15, 2023
@nreese nreese added the v8.12.0 label Nov 15, 2023
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

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

New exports from kbn-search-response-warnings/index.ts LGTM

Copy link
Member

@nickpeihl nickpeihl left a comment

Choose a reason for hiding this comment

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

I left a question, but nothing that necessarily needs to block merging.

lgtm! code review and tested errors and warnings on different layer types and settings.

}: {
registerCancelCallback: (callback: () => void) => void;
requestDescription: string;
Copy link
Member

Choose a reason for hiding this comment

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

I'm slightly concerned that we may be removing useful context for the user when removing the requestDescription. Did you find the requestDescription was not helpful or inaccurate or maybe some other reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found requestDescription to be dive too deeply into implementation details. The user only cares about what is getting loaded, like layer features or join metrics. Details about how layer features are elasticsearch aggregation buckets vs elasticsearch documents is not important and should not be surfaced at a high level. Users can interrogate the request if they really want all the implementation details.

@nreese nreese merged commit 0b24e40 into elastic:main Nov 16, 2023
33 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 16, 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:Maps release_note:enhancement Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[maps] vector tile layer does not display request warnings [maps] display search request warnings in legend
6 participants