[Logs UI] Limit extendDatemath to valid ranges#71113
Merged
afgomez merged 3 commits intoelastic:masterfrom Jul 10, 2020
Merged
Conversation
There are cases where either Elasticsearch or the JS runtime will fail if the extended datemath expression goes beyond a certain limit. In the case of ES, if the new date results in a UNIX epoch smaller than 0, it will crash. In the case of the JS runtime, it will crash if the UNIX epoch is higher than [8,640,000,000,000,000ms][1]. [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
Contributor
|
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
afgomez
pushed a commit
that referenced
this pull request
Jul 13, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Jul 13, 2020
* master: (78 commits) Bump lodash package version (elastic#71392) refactor: 💡 use allow-list in AppArch codebase (elastic#71400) improve bugfix 7198 test stability (elastic#71250) [Security Solution][Ingest Manager][Endpoint] Optional ingest manager (elastic#71198) [Metrics UI] Round metric threshold time buckets to nearest unit (elastic#71172) [Security Solution][Endpoint] Policy creation callback fixes + Improved error handling in user manifest loop (elastic#71269) [Security Solution] Allow to configure Event Renderers settings (elastic#69693) Fix a11y keyboard overlay (elastic#71214) [APM] UI text updates (elastic#71333) [Logs UI] Limit `extendDatemath` to valid ranges (elastic#71113) [SIEM] fix tooltip of notes (elastic#71342) address index templates feedback (elastic#71353) Upgrade EUI to v26.3.1 (elastic#70243) [build] Creates Linux aarch64 archive (elastic#69165) [SIEM][Detection Engine] Fixes skipped tests (elastic#71347) [SIEM][Detection Engine][Lists] Adds read_privileges route for lists and list items [kbn/optimizer] implement "requiredBundles" property of KP plugins (elastic#70911) [Security Solution][Exceptions] - Exceptions modal pt 2 (elastic#70886) [ML] DF Analytics: stop status polling when job stopped (elastic#71159) [SIEM][CASE] IBM Resilient Connector (elastic#66385) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are cases where either Elasticsearch or the JS runtime will fail if the extended datemath expression goes beyond a certain limit.
In the case of ES, if the new date results in a UNIX epoch smaller than 0, it will crash. In the case of the JS runtime, it will crash if the UNIX epoch is higher than 8,640,000,000,000,000ms.
These limits resulted in the UI either having a broken state or raising an exception.
Fixes #67683
How to test
The easiest way to test both ranges is to limit the log stream to one line. To do so, open the details of any line and apply the filter in the
_idfield.Once applied, change the date range to the following:
epoch 0in your time zone, like "Jan 2, 1970 @ 00:00:00.000"The UI shouldn't show the buttons to extend the date range.
Checklist