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

Failing test: Entity Analytics - Risk Engine Integration Tests - ESS Env - Trial License.x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_preview·ts - Entity Analytics - Risk Engine @ess @serverless Risk Scoring Preview API with auditbeat data risk score ordering aggregates multiple scores such that the highest-risk scores contribute the majority of the score #183758

Closed
kibanamachine opened this issue May 17, 2024 · 2 comments
Assignees
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Entity Analytics Security Entity Analytics Team

Comments

@kibanamachine
Copy link
Contributor

A test failed on a tracked branch

Error: expected [ { id_field: 'host.name',
    id_value: 'host-1',
    calculated_level: 'High',
    calculated_score: 192.88436117703117,
    calculated_score_norm: 73.84546752566278,
    category_1_score: 73.84546752566278,
    category_1_count: 100 } ] to sort of equal [ { calculated_level: 'High',
    calculated_score: 225.1106801442913,
    calculated_score_norm: 86.18326192354185,
    category_1_count: 100,
    category_1_score: 86.18326192354185,
    id_field: 'host.name',
    id_value: 'host-1' } ]
    at Assertion.assert (expect.js:100:11)
    at Assertion.eql (expect.js:244:8)
    at Context.<anonymous> (risk_score_preview.ts:406:51)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.apply (wrap_function.js:73:16) {
  actual: '[\n' +
    '  {\n' +
    '    "calculated_level": "High"\n' +
    '    "calculated_score": 192.88436117703117\n' +
    '    "calculated_score_norm": 73.84546752566278\n' +
    '    "category_1_count": 100\n' +
    '    "category_1_score": 73.84546752566278\n' +
    '    "id_field": "host.name"\n' +
    '    "id_value": "host-1"\n' +
    '  }\n' +
    ']',
  expected: '[\n' +
    '  {\n' +
    '    "calculated_level": "High"\n' +
    '    "calculated_score": 225.1106801442913\n' +
    '    "calculated_score_norm": 86.18326192354185\n' +
    '    "category_1_count": 100\n' +
    '    "category_1_score": 86.18326192354185\n' +
    '    "id_field": "host.name"\n' +
    '    "id_value": "host-1"\n' +
    '  }\n' +
    ']',
  showDiff: true
}

First failure: kibana-on-merge - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label May 17, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label May 17, 2024
@kibanamachine kibanamachine added the Team:Entity Analytics Security Entity Analytics Team label May 17, 2024
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label May 17, 2024
@hop-dev hop-dev self-assigned this May 17, 2024
@jaredburgettelastic
Copy link
Contributor

We're reverting this code, and investigating why it failed on-merge

hop-dev added a commit that referenced this issue May 20, 2024
…n (with sorting fix after test failure) (#183844)

## Summary

This code was originally approved and merged in
#182038

It was then reverted in #183759
after a [test failure](#183758).

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](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6045)
🟢

---------

Co-authored-by: oatkiller <robert.austin@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@hop-dev hop-dev closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Entity Analytics Security Entity Analytics Team
Projects
None yet
Development

No branches or pull requests

4 participants