-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Discover] Bypass no-data check in dev mode #133461
Conversation
46feeca
to
f68d97e
Compare
@elasticmachine merge upstream |
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.
I managed to break it for some reason. So I've been testing, and it looked good, but then at a certain point I started to get a blank Discover view, without any error message
I started to investigate and when I was looking into the data views section there were some new ones that I didn't create, they were created by the system:
Looking at my browser history, it seems I've accidentally clicked on our security app
And this lead to the white screen because hasUserDataView
in the code was set to true for this case.
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
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.
LGTM 👍 The empty page when security data views were provided is fixed. So this fixes it for dev
mode. On thing I wonder, are we sure this is not a demand for the non - dev
-mode?
If we bypass this check in non-dev mode, the no-data check basically makes no sense as there will always be system-created indices. We want to explicitly guide users to add integrations and add data. |
Summary
Addresses: #133273
Developers have a use-case to view dotted-prefixed indexed. In the current implementation of
hasESData
check, these indices will be treated as non-user-created (which they are); which means we will treat them as there is no actual data in Elasticsearch. This can cause unnecessary steps for developers who have an interest in those indices; they will now need to create a non-dot prefixed index to use Discover.This PR bypasses the no-data check in case of a dev environment.
As mentioned in the issue, I believe the appropriate place to implement this is in the service itself. As such, let's consider this a short-term mitigation.
Checklist
Delete any items that are not applicable to this PR.
- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] Any UI touched in this PR is usable by keyboard only (learn more about keyboard accessibility)- [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)- [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this in your browser)- [ ] This was checked for cross-browser compatibilityFor maintainers