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

[Lens] Field list is empty when missing permissions to view the mappings #70520

Closed
AlonaNadler opened this issue Jul 1, 2020 · 6 comments
Closed
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@AlonaNadler
Copy link

Version 7.8
Lens index pattern has values in Discover and when I drag fields to the preview but on the left side it shows all fields has no data.

image

@AlonaNadler AlonaNadler added bug Fixes for quality problems that affect the customer experience Feature:Lens labels Jul 1, 2020
@mbondyra
Copy link
Contributor

mbondyra commented Jul 2, 2020

Hi @AlonaNadler, we need more details on this one. For starters, could you provide a screenshot of the discover page and the whole lens page (eg including time range picker)? Is this a cloud instance I could look into?

@flash1293
Copy link
Contributor

This happens if the current user is not allowed to fetch mappings: security_exception] action [indices:admin/mappings/get]

It looks like we need this permission, so the only thing we can do here is to improve the handling of this case. Maybe just show all fields as available if the existence request fails? What do you think @mbondyra @wylieconlon ?

@wylieconlon
Copy link
Contributor

wylieconlon commented Jul 2, 2020

Here's the decision tree I would use:

The main question here is whether we can stop making three requests for field existence, specifically the mapping request. The mapping request is used to determine that .keyword fields are multi-mapped, and we might have two ways of avoiding the need for this request:

  1. We could use the new fields request parameter, which is partially available: Search 'fields' option design + implementation elasticsearch#55363. This new API would let us skip the mapping and field_caps requests.

  2. We could skip the mapping query by adding the docvalue_fields parameter to the 500 docs search request for certain fields. There is a 100 field limit to this approach, so I think we probably can't use this in all cases.

The new fields request parameter was introduced mostly to solve this problem, so I think we should try that approach first. If neither of these works, and we can't remove the mapping request, then I think we should actually introduce a third accordion panel for "unknown status", which would show all fields.

If that's too complicated, then all fields should be marked available.

@wylieconlon wylieconlon added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jul 2, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@wylieconlon wylieconlon changed the title Lens shows fields as empty even when there is values. [Lens] Field list is empty when missing permissions to view the mappings Jul 2, 2020
@flash1293
Copy link
Contributor

flash1293 commented Jul 3, 2020

I definitely like removing unnecessary calls for the existence check, especially because we call it relatively often.

If neither of these works, and we can't remove the mapping request, then [...]

I think we should do this part anyway - there are much more reasons for this request to fail. My vote would be to show them under "available fields" with a little warning icon including a tooltip with something like "Couldn't fetch existence information".

@flash1293
Copy link
Contributor

#70718 mitigates the problem by handling it gracefully in the UI, but we still should try to improve the. way we fetch field existence data. I created a separate issue for this: #72012

@flash1293 flash1293 self-assigned this Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

5 participants