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
On search source error, show 'view details' action that opens request in inspector #170790
Conversation
@elasticmachine merge upstream |
@elasticmachine merge upstream |
Pinging @elastic/kibana-presentation (Team:Presentation) |
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
I will leave the review to the Discovery team which owns search |
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.
It looks like we're still missing at least one error. Steps to reproduce:
- Ingest a nested document:
PUT my-index-000001
{
"mappings": {
"properties": {
"user": {
"type": "nested"
}
}
}
}
POST my-index-000001/_doc
{
"group" : "fans",
"user" : [
{
"first" : "John",
"last" : "Smith"
},
{
"first" : "Alice",
"last" : "White"
}
]
}
- Try to query using incorrect KQL syntax:
user.last.keyword : "Smith"
Here's the error:
And here's what you get when clicking "View details":
Thanks for the example error. In this case, the error is not an The "View details" is button is the one from discover error callout. The think the current behavior is expected since there is nothing to view in the inspector since the request never made it to elasticsearch. |
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.
The error is thrown before search_source.fetch is called so there is never a request/response from elasticsearch.
Makes sense, thanks for the explanation!
LGTM
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.
Presentation team changes LGTM! Tested this locally in chrome and the view details
button appears when expected and works as expected. Also looked through the code, and everything looks great. Left one nit.
src/plugins/embeddable/public/embeddable_panel/embeddable_panel_error.tsx
Outdated
Show resolved
Hide resolved
src/plugins/embeddable/public/embeddable_panel/embeddable_panel_error.tsx
Show resolved
Hide resolved
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
… in inspector (elastic#170790) Closes elastic#167904 PR updates `EsError` with `getActions` method that returns "View details" button. Clicking "View details" opens inspector to request that failed. PR updates Discover and maps to display EsError action. PR does not update lens to display "View details". Chatted with @drewdaemon and the implementation path is more involved. This will be completed in another PR. ### Test setup 1. install sample web logs ### Test discover with EsError 1. open discover 2. Add filter ``` { "error_query": { "indices": [ { "error_type": "exception", "message": "local shard failure message 123", "name": "kibana_sample_data_logs" } ] } } ``` 3. Verify `View details` action is displayed and clicking action opens inspector <img width="300" alt="Screenshot 2023-11-07 at 12 53 31 PM" src="https://github.com/elastic/kibana/assets/373691/6b43e9c8-daab-4782-876e-ded6958d15cf"> ### Test search embeddable with EsError 1. create new dashboard. Add saved search from `kibana_sample_data_logs` data view 2. Add filter ``` { "error_query": { "indices": [ { "error_type": "exception", "message": "local shard failure message 123", "name": "kibana_sample_data_logs" } ] } } ``` 3. Verify `View details` action is displayed and clicking action opens inspector <img width="300" alt="Screenshot 2023-11-07 at 12 55 46 PM" src="https://github.com/elastic/kibana/assets/373691/5ebe37c6-467a-4d72-89e3-21fc53f59d89"> ### Test discover with PainlessError <img width="300" alt="Screenshot 2023-11-07 at 12 52 51 PM" src="https://github.com/elastic/kibana/assets/373691/6d17498f-657c-46e8-86e8-dde461599267"> ### Test Maps error 1. create new map 2. Add `documents` layer 3. Set scaling to "limit to 10000" 4. Add filter ``` { "error_query": { "indices": [ { "error_type": "exception", "message": "local shard failure message 123", "name": "kibana_sample_data_logs" } ] } } ``` 5. Verify "View details" button is displayed in maps legend in error callout <img width="500" alt="Screenshot 2023-11-08 at 12 07 42 PM" src="https://github.com/elastic/kibana/assets/373691/2eb2cc41-0919-49a3-9792-fda9707973cb"> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes #167904
PR updates
EsError
withgetActions
method that returns "View details" button. Clicking "View details" opens inspector to request that failed. PR updates Discover and maps to display EsError action.PR does not update lens to display "View details". Chatted with @drewdaemon and the implementation path is more involved. This will be completed in another PR.
Test setup
Test discover with EsError
View details
action is displayed and clicking action opens inspectorTest search embeddable with EsError
kibana_sample_data_logs
data viewView details
action is displayed and clicking action opens inspectorTest discover with PainlessError
Test Maps error
documents
layer