-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Default timefield as a missing field is causing an esaggs error #84058
Comments
Pinging @elastic/kibana-app (Team:KibanaApp) |
I'd say that the behaviour here should match the #81439 one, as when there's a missing field. |
@mbondyra So this error happens because the index pattern still has the default time field set to a non-existent field? If yes, then IMHO this is an app-services bug and should be handled on the index pattern level by resetting the default time field. |
Pinging @elastic/kibana-app-services (Team:AppServices) |
@mattkime This seems to be a consistency problem of index patterns - if a field disappears from the field list, it shouldn't be possible to have it listed as default time field anymore. Maybe this is something to take care of in your current PR removing the cached field list? |
@mattkime @flash1293 I've checked how is visualize handling it and it's basically the same problem - visualization is not showing anything, the timefield cannot be changed and there's an error in the console (I changed ts to ts1, but you cannot change it in the select list). A user is not able to fix the visualization. |
@flash1293 I don't think it make sense to change the index pattern timestamp field based on which fields are available. The fields can change. Just as the timestamp field can be missing from docs, it can also be restored. Further, there's not really a way of resolving the issue of a missing timestamp field. We can return That said, the error could certainly be handled better. It seems to me that it might be handled on two levels - a universal error message that states the problem and a use case specific graceful handling of the problem. I do like the idea of being able to fix the problem directly from lens. This might help get us there - #67711 |
@mattkime Maybe I should be more specific - I don't expect the saved object to be updated or anything and resolving this by selecting another time field or similar. The current problem @mbondyra reported is caused by this line:
This is not the case in all situations, at least not in the one linked above. It is referring to the non-existent field which is causing this exception within the My proposal is: If the default time field is not part of the
It would be cool to edit the index pattern from within Lens, but this is too far out IMHO for fixing this bug. |
Its still not clear to me how this relates to the index pattern code. Doesn't it relate to the code in Perhaps you're suggesting that when an index pattern doesn't have a field for its set |
Sorry, I wrapped up too much into a single paragraph. Yeah, I was referring to return I'm fine with fixing this in the consumers by not assuming that implication and explicitly checking whether the referenced field exists, but it seems worth documenting it explicitly as part of the API as it's definitely easy to miss. |
Expected behavior: I am not sure if we should 'recover' the visualization in this case by changing the timefield. Maybe we should only improve messaging? Removing all the columns help, but once the user wants to build date histogram on the proper timefield, the error surfaces again.
The text was updated successfully, but these errors were encountered: