-
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
[Security Solution][Detections] Look-back time logic fix #81383
Merged
Merged
Conversation
This file contains 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
dplumlee
added
release_note:fix
Team:SIEM
v8.0.0
Feature:Detection Rules
Security Solution rules and Detection Engine
v7.11.0
labels
Oct 21, 2020
dplumlee
commented
Oct 21, 2020
return `${Math.floor(fromDuration.asSeconds())}s`; | ||
} else if (fromDuration.asMinutes() < 60) { | ||
return `${Math.floor(fromDuration.asMinutes())}m`; | ||
// Basing calculations off floored seconds count as moment durations weren't precise |
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 stopped using the moment duration in these calculations because they weren't consistent/precise and made the tests flaky.
Pinging @elastic/siem (Team:SIEM) |
...ck/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.test.tsx
Show resolved
Hide resolved
marshallmain
approved these changes
Oct 21, 2020
💚 Build SucceededMetrics [docs]async chunks size
History
To update your PR or re-run it, just comment with: |
dplumlee
added a commit
that referenced
this pull request
Oct 22, 2020
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Oct 22, 2020
* master: (63 commits) [KP] Fix Headers timeout issue (elastic#81140) [ML] Functional tests - stabilize typing with checks service method (elastic#81338) tabify - support docs (elastic#80351) [Security Solution][Detections] Look-back time logic fix (elastic#81383) [Workplace Search] Add top-level tests for Groups (elastic#81215) [Fleet] Fix agent action observable for long polling (elastic#81376) [Maps] fix feature tooltip remains open when zoom level change hides layer (elastic#81373) skip flaky suite (elastic#78689) chore(NA): add spec-to-console and plugin-helpers as devOnly dependencies (elastic#81357) Ensure some data is returned (elastic#81375) Change dumb-init to tini (elastic#81126) [Reporting/Tech Debt] Convert PdfMaker class to TypeScript (elastic#81242) Use Storybook Controls instead of Knobs (elastic#80705) [junit] make sure that report paths are unique (elastic#81255) bump elastic/elasticsearch-js version to 7.10.0-rc1 (elastic#81288) run ssl tests on CI (elastic#81320) Fix alert defaults (elastic#81207) [ML] DF Analytics wizard: ensure user can set mml manually or select to use given estimate (elastic#81078) Add UI notifier to indicate secret fields and to remember / reenter values (elastic#80657) [Monitoring] Use async/await (elastic#81200) ...
MindyRS
added
the
Team: SecuritySolution
Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
label
Oct 27, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature:Detection Rules
Security Solution rules and Detection Engine
release_note:fix
Team: SecuritySolution
Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Team:SIEM
v7.11.0
v8.0.0
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.
Summary
Addresses #74767
Changes logic to not clobber specific look-back times. Before we would change values over 1 minute to the lowest minute (e.g.
90 sec
->1 min
), and values over 1 hour to the lowest hour (e.g.137 min
->2 hr
). This fixes our logic so we display the look-back time in whatever units the user selected unless they enter a time factorable number, in which case we factor that down (e.g.120 min
->2 hr
,300 sec
->5 min
)Screenshots
Checklist
Delete any items that are not applicable to this PR.
For maintainers