Skip to content

[Security Solutions] Fix entity analytics dashboard error that appear during cypress tests#168709

Merged
machadoum merged 7 commits intoelastic:mainfrom
machadoum:siem-ea-fix-cypress-test
Oct 17, 2023
Merged

[Security Solutions] Fix entity analytics dashboard error that appear during cypress tests#168709
machadoum merged 7 commits intoelastic:mainfrom
machadoum:siem-ea-fix-cypress-test

Conversation

@machadoum
Copy link
Member

@machadoum machadoum commented Oct 12, 2023

Summary

Fix Entity analytics dashboard error that popped up during Cypress tests.

Solutions:
I added the same check we have for the risk score fetch to the risk score KPI fetch.
It prevents the UI from fetching the KPI when the index doesn't exist.

Checklist

@machadoum machadoum self-assigned this Oct 12, 2023
@machadoum machadoum added Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Entity Analytics Security Solution Entity Analytics features labels Oct 12, 2023
@machadoum machadoum force-pushed the siem-ea-fix-cypress-test branch from e9affe5 to f890332 Compare October 12, 2023 15:52
@machadoum machadoum force-pushed the siem-ea-fix-cypress-test branch from f890332 to f9f7773 Compare October 13, 2023 07:39
Comment on lines +84 to +89
!skip &&
defaultIndex &&
!isDeprecatedLoading &&
isAuthorized &&
isEnabled &&
!isDeprecated
Copy link
Member Author

Choose a reason for hiding this comment

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

Apply the same check we do when fetching risk scores:

if (
!skip &&
!isDeprecatedLoading &&
riskScoreRequest != null &&
isAuthorized &&
isEnabled &&
!isDeprecated

@machadoum machadoum marked this pull request as ready for review October 13, 2023 08:03
@machadoum machadoum requested a review from a team as a code owner October 13, 2023 08:03
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@machadoum machadoum added technical debt Improvement of the software architecture and operational architecture release_note:skip Skip the PR/issue when compiling release notes labels Oct 13, 2023
Copy link
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

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

LGTM

@machadoum machadoum enabled auto-merge (squash) October 17, 2023 12:27
@kibanamachine kibanamachine requested a review from a team October 17, 2023 12:33
Copy link
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

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

AO code change looks good to me

@kibana-ci
Copy link

kibana-ci commented Oct 17, 2023

💔 Build Failed

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
observability 1.0MB 1.0MB +121.0B
securitySolution 13.0MB 13.0MB +122.0B
total +243.0B

History

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

cc @machadoum

@machadoum machadoum merged commit ad58290 into elastic:main Oct 17, 2023
@kibanamachine kibanamachine added v8.12.0 backport:skip This PR does not require backporting labels Oct 17, 2023
hop-dev pushed a commit to hop-dev/kibana that referenced this pull request Oct 18, 2023
… during cypress tests (elastic#168709)

## Summary

Fix Entity analytics dashboard error that popped up during Cypress
tests.

Solutions:
I added the same check we have for the risk score fetch to the risk
score KPI fetch.
It prevents the UI from fetching the KPI when the index doesn't exist.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Entity Analytics Security Solution Entity Analytics features release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting Security Solution Threat Hunting Team technical debt Improvement of the software architecture and operational architecture v8.12.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants