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

[Security Solution] Refactors All exception lists - read only tests to remove flakiness #146677

Merged

Conversation

MadameSheema
Copy link
Member

@MadameSheema MadameSheema commented Nov 30, 2022

Summary

The aim of this PR is to remove the flakiness on the All exception lists - read only Cypress tests.

Yesterday we've seen these tests failing a lot on different PRs, in order to make the tests more robust, this is the list of changes that have been implemented:

  • We have changed the esArchiverResetKibana for cleanKibana since the cleaning the second method does is more extensive than the first one.
  • We have moved part of the before hook code to a beforeEach. We use the Cypress test retries capability, this only reexecute the code inside the beforeEach hook not the one on the before.
  • As the exception list creation has been moved to the beforeEach hook, now before creating the exception list, we make sure the list is deleted before taking the action.

All the above modifications should have made the test more reliable.

@MadameSheema MadameSheema marked this pull request as ready for review November 30, 2022 13:59
@MadameSheema MadameSheema requested a review from a team as a code owner November 30, 2022 13:59
@MadameSheema MadameSheema self-assigned this Nov 30, 2022
@MadameSheema MadameSheema added release_note:skip Skip the PR/issue when compiling release notes Team:Detections and Resp Security Detection Response Team Team:Security Solution Platform Security Solution Platform Team labels Nov 30, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@MadameSheema
Copy link
Member Author

@elasticmachine merge upstream

Copy link
Contributor

@WafaaNasr WafaaNasr left a comment

Choose a reason for hiding this comment

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

Thank you!!

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 109 115 +6
securitySolution 442 448 +6
total +20

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 68 74 +6
osquery 110 117 +7
securitySolution 519 525 +6
total +21

History

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

cc @MadameSheema

@MadameSheema MadameSheema merged commit 8a6cc0c into elastic:main Nov 30, 2022
@MadameSheema MadameSheema deleted the cypress/fixes-exceptions-flaky branch November 30, 2022 15:41
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 30, 2022
… to remove flakiness (elastic#146677)

Co-authored-by: Kibana Machine <[email protected]>
(cherry picked from commit 8a6cc0c)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.6

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 30, 2022
… tests to remove flakiness (#146677) (#146708)

# Backport

This will backport the following commits from `main` to `8.6`:
- [[Security Solution] Refactors `All exception lists - read only` tests
to remove flakiness
(#146677)](#146677)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Gloria
Hornero","email":"[email protected]"},"sourceCommit":{"committedDate":"2022-11-30T15:41:44Z","message":"[Security
Solution] Refactors `All exception lists - read only` tests to remove
flakiness (#146677)\n\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"8a6cc0cd26425afa67a448ffadc4de15f82d208d","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections
and Resp","Team:Security Solution
Platform","v8.6.0","v8.7.0"],"number":146677,"url":"https://github.com/elastic/kibana/pull/146677","mergeCommit":{"message":"[Security
Solution] Refactors `All exception lists - read only` tests to remove
flakiness (#146677)\n\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"8a6cc0cd26425afa67a448ffadc4de15f82d208d"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/146677","number":146677,"mergeCommit":{"message":"[Security
Solution] Refactors `All exception lists - read only` tests to remove
flakiness (#146677)\n\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"8a6cc0cd26425afa67a448ffadc4de15f82d208d"}}]}]
BACKPORT-->

Co-authored-by: Gloria Hornero <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Detections and Resp Security Detection Response Team Team:Security Solution Platform Security Solution Platform Team v8.6.0 v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants