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

[Entity Analytics] Move risk scoring painless to static files... again (with sorting fix after test failure) #183844

Merged
merged 29 commits into from
May 20, 2024

Conversation

hop-dev
Copy link
Contributor

@hop-dev hop-dev commented May 20, 2024

Summary

This code was originally approved and merged in #182038

It was then reverted in #183759 after a test failure.

The previous code had introduced flakiness, occasionally the inputs would be supplied to risk scoring in the wrong order causing the score to decrease. Re-adding the sorting in the reduce script has fixed this.

Here is the only new code: a8cbb1c

Flaky test run 🟢

oatkiller and others added 29 commits April 29, 2024 17:00
…based weighting

the category based weighting, like all weighting, isn't used and we probably won't re-implement it in the next version of risk scoring

this commit probably doesn't work. i can't get integration tests running locally

I put the painless scripts in a directory and I load them from the file system at runtime.

We should figure out how to bundle the scripts possibly. I'm not sure that it matters a lot, but I would like any static analysis processes to be able to work with this code as usual. e.g. i'd like to get a static-time error if a file is missing vs needing to run the risk engine task to find out a file is missing
@hop-dev hop-dev self-assigned this May 20, 2024
@hop-dev hop-dev requested a review from a team as a code owner May 20, 2024 15:41
@hop-dev hop-dev requested a review from machadoum May 20, 2024 15:41
@hop-dev hop-dev added release_note:skip Skip the PR/issue when compiling release notes Team:Entity Analytics Security Entity Analytics Team labels May 20, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-entity-analytics (Team:Entity Analytics)

@hop-dev hop-dev changed the title [Entity Analytics] Risk score painless refactor [Entity Analytics] Move risk painless to static files... again (with sorting fix after test failure) May 20, 2024
@hop-dev hop-dev changed the title [Entity Analytics] Move risk painless to static files... again (with sorting fix after test failure) [Entity Analytics] Move risk scoring painless to static files... again (with sorting fix after test failure) May 20, 2024
@hop-dev hop-dev enabled auto-merge (squash) May 20, 2024 15:45
Copy link
Contributor

@jaredburgettelastic jaredburgettelastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for getting to the bottom of the issue and running the Flaky Test Runner

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 15.1MB 15.1MB -188.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 521 522 +1

Total ESLint disabled count

id before after diff
securitySolution 603 604 +1

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @hop-dev

@hop-dev hop-dev merged commit 1830300 into elastic:main May 20, 2024
42 checks passed
@kibanamachine kibanamachine added v8.15.0 backport:skip This commit does not require backporting labels May 20, 2024
@hop-dev hop-dev deleted the risk-score-painless-refactor branch May 21, 2024 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Entity Analytics Security Entity Analytics Team v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants