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

[EDR Workflows] Unskip and fix flaky endpoint exceptions FTR #197457

Conversation

gergoabraham
Copy link
Contributor

@gergoabraham gergoabraham commented Oct 23, 2024

Summary

closes #173184
closes #173441
closes #196003

This PR tries to improve on the StaleElementReferenceError happening in Endpoint Exception tests.

This error is thrown if an element has already been removed from the DOM when trying to perform an action on it. For some reference, see #140427

Improvements:

  • the part that was failing is wrapped inside the retryOnStale helper: 602f229
    note: actually the test fails have started in December, 2023, but the line where the fail was in the last test runs were added in May, 2024 ([EDR Workflows][tests] Enable endpoint exceptions integration test #183471). unfortunately, the log artifacts from 2023 are already removed from Buildkite, so no certainty on what happened back then
  • another suspicious part was wrapped as well: ec8c5cf and e5245ad
  • and as an extra, wait for page load: 7cd867f

flaky 50/50 ✅ but this doesn't mean much, as this issue happens quite rarely ¯\(◉‿◉)/¯

Checklist

Delete any items that are not applicable to this PR.

@gergoabraham gergoabraham added release_note:skip Skip the PR/issue when compiling release notes Team:Defend Workflows “EDR Workflows” sub-team of Security Solution backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development labels Oct 23, 2024
@gergoabraham gergoabraham self-assigned this Oct 23, 2024
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7227

[✅] x-pack/test/security_solution_endpoint/configs/integrations.config.ts: 50/50 tests passed.

see run history

@gergoabraham gergoabraham marked this pull request as ready for review October 23, 2024 15:57
@gergoabraham gergoabraham requested a review from a team as a code owner October 23, 2024 15:57
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-defend-workflows (Team:Defend Workflows)

@gergoabraham gergoabraham requested review from ashokaditya and removed request for parkiino October 23, 2024 16:15
@gergoabraham
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #16 / installWithTimeout should short-circuit installFn if it exceeds configured timeout

Metrics [docs]

✅ unchanged

History

cc @gergoabraham

Copy link
Contributor

@tomsonpl tomsonpl left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! 🚀

@gergoabraham gergoabraham merged commit f151e2c into elastic:main Oct 24, 2024
23 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.15, 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11501404084

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 24, 2024
…#197457)

## Summary

closes elastic#173184
closes elastic#173441
closes elastic#196003

This PR tries to improve on the `StaleElementReferenceError` happening
in Endpoint Exception tests.

This error is thrown if an element has already been removed from the DOM
when trying to perform an action on it. For some reference, see
elastic#140427

Improvements:
- the part that was failing is wrapped inside the `retryOnStale` helper:
602f229
**note:** actually the test fails have started in December, 2023, but
the line where the fail was in the last test runs were added in May,
2024 (elastic#183471). unfortunately, the
log artifacts from 2023 are already removed from Buildkite, so no
certainty on what happened back then
- another suspicious part was wrapped as well:
ec8c5cf and
e5245ad
- and as an extra, wait for page load:
7cd867f

flaky 50/50 ✅ but this doesn't mean much, as this issue happens quite
rarely ¯\\(◉‿◉)/¯

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit f151e2c)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 24, 2024
…#197457)

## Summary

closes elastic#173184
closes elastic#173441
closes elastic#196003

This PR tries to improve on the `StaleElementReferenceError` happening
in Endpoint Exception tests.

This error is thrown if an element has already been removed from the DOM
when trying to perform an action on it. For some reference, see
elastic#140427

Improvements:
- the part that was failing is wrapped inside the `retryOnStale` helper:
602f229
**note:** actually the test fails have started in December, 2023, but
the line where the fail was in the last test runs were added in May,
2024 (elastic#183471). unfortunately, the
log artifacts from 2023 are already removed from Buildkite, so no
certainty on what happened back then
- another suspicious part was wrapped as well:
ec8c5cf and
e5245ad
- and as an extra, wait for page load:
7cd867f

flaky 50/50 ✅ but this doesn't mean much, as this issue happens quite
rarely ¯\\(◉‿◉)/¯

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit f151e2c)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.15 Backport failed because of merge conflicts
8.16
8.x

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 197457

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 24, 2024
…197457) (#197662)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[EDR Workflows] Unskip and fix flaky endpoint exceptions FTR
(#197457)](#197457)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Gergő
Ábrahám","email":"gergo.abraham@elastic.co"},"sourceCommit":{"committedDate":"2024-10-24T14:27:08Z","message":"[EDR
Workflows] Unskip and fix flaky endpoint exceptions FTR (#197457)\n\n##
Summary\r\n\r\ncloses #173184 \r\ncloses #173441\r\ncloses
#196003\r\n\r\nThis PR tries to improve on the
`StaleElementReferenceError` happening\r\nin Endpoint Exception
tests.\r\n\r\nThis error is thrown if an element has already been
removed from the DOM\r\nwhen trying to perform an action on it. For some
reference,
see\r\nhttps://github.com//pull/140427\r\n\r\nImprovements:\r\n-
the part that was failing is wrapped inside the `retryOnStale`
helper:\r\n602f2294fddb9bee8b69ebf2fd8382e9f025d59d\r\n**note:**
actually the test fails have started in December, 2023, but\r\nthe line
where the fail was in the last test runs were added in May,\r\n2024
(#183471). unfortunately,
the\r\nlog artifacts from 2023 are already removed from Buildkite, so
no\r\ncertainty on what happened back then\r\n- another suspicious part
was wrapped as well:\r\nec8c5cfd94812c8e5b357e00aac8bfae93ceecf4
and\r\ne5245ad010a02527105a56973465a25feb52ec85\r\n- and as an extra,
wait for page
load:\r\n7cd867fcb9489b24e79066dce750a2381af93d7d\r\n\r\nflaky 50/50 ✅
but this doesn't mean much, as this issue happens quite\r\nrarely
¯\\\\(◉‿◉)/¯\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are
not applicable to this PR.\r\n\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"f151e2ccaa55cc5e13740f49e88c323c0e1d8f6d","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Defend
Workflows","backport:prev-major"],"title":"[EDR Workflows] Unskip and
fix flaky endpoint exceptions
FTR","number":197457,"url":"https://github.com/elastic/kibana/pull/197457","mergeCommit":{"message":"[EDR
Workflows] Unskip and fix flaky endpoint exceptions FTR (#197457)\n\n##
Summary\r\n\r\ncloses #173184 \r\ncloses #173441\r\ncloses
#196003\r\n\r\nThis PR tries to improve on the
`StaleElementReferenceError` happening\r\nin Endpoint Exception
tests.\r\n\r\nThis error is thrown if an element has already been
removed from the DOM\r\nwhen trying to perform an action on it. For some
reference,
see\r\nhttps://github.com//pull/140427\r\n\r\nImprovements:\r\n-
the part that was failing is wrapped inside the `retryOnStale`
helper:\r\n602f2294fddb9bee8b69ebf2fd8382e9f025d59d\r\n**note:**
actually the test fails have started in December, 2023, but\r\nthe line
where the fail was in the last test runs were added in May,\r\n2024
(#183471). unfortunately,
the\r\nlog artifacts from 2023 are already removed from Buildkite, so
no\r\ncertainty on what happened back then\r\n- another suspicious part
was wrapped as well:\r\nec8c5cfd94812c8e5b357e00aac8bfae93ceecf4
and\r\ne5245ad010a02527105a56973465a25feb52ec85\r\n- and as an extra,
wait for page
load:\r\n7cd867fcb9489b24e79066dce750a2381af93d7d\r\n\r\nflaky 50/50 ✅
but this doesn't mean much, as this issue happens quite\r\nrarely
¯\\\\(◉‿◉)/¯\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are
not applicable to this PR.\r\n\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"f151e2ccaa55cc5e13740f49e88c323c0e1d8f6d"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197457","number":197457,"mergeCommit":{"message":"[EDR
Workflows] Unskip and fix flaky endpoint exceptions FTR (#197457)\n\n##
Summary\r\n\r\ncloses #173184 \r\ncloses #173441\r\ncloses
#196003\r\n\r\nThis PR tries to improve on the
`StaleElementReferenceError` happening\r\nin Endpoint Exception
tests.\r\n\r\nThis error is thrown if an element has already been
removed from the DOM\r\nwhen trying to perform an action on it. For some
reference,
see\r\nhttps://github.com//pull/140427\r\n\r\nImprovements:\r\n-
the part that was failing is wrapped inside the `retryOnStale`
helper:\r\n602f2294fddb9bee8b69ebf2fd8382e9f025d59d\r\n**note:**
actually the test fails have started in December, 2023, but\r\nthe line
where the fail was in the last test runs were added in May,\r\n2024
(#183471). unfortunately,
the\r\nlog artifacts from 2023 are already removed from Buildkite, so
no\r\ncertainty on what happened back then\r\n- another suspicious part
was wrapped as well:\r\nec8c5cfd94812c8e5b357e00aac8bfae93ceecf4
and\r\ne5245ad010a02527105a56973465a25feb52ec85\r\n- and as an extra,
wait for page
load:\r\n7cd867fcb9489b24e79066dce750a2381af93d7d\r\n\r\nflaky 50/50 ✅
but this doesn't mean much, as this issue happens quite\r\nrarely
¯\\\\(◉‿◉)/¯\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are
not applicable to this PR.\r\n\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"f151e2ccaa55cc5e13740f49e88c323c0e1d8f6d"}}]}]
BACKPORT-->

Co-authored-by: Gergő Ábrahám <gergo.abraham@elastic.co>
kibanamachine added a commit that referenced this pull request Oct 24, 2024
…197457) (#197661)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[EDR Workflows] Unskip and fix flaky endpoint exceptions FTR
(#197457)](#197457)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Gergő
Ábrahám","email":"gergo.abraham@elastic.co"},"sourceCommit":{"committedDate":"2024-10-24T14:27:08Z","message":"[EDR
Workflows] Unskip and fix flaky endpoint exceptions FTR (#197457)\n\n##
Summary\r\n\r\ncloses #173184 \r\ncloses #173441\r\ncloses
#196003\r\n\r\nThis PR tries to improve on the
`StaleElementReferenceError` happening\r\nin Endpoint Exception
tests.\r\n\r\nThis error is thrown if an element has already been
removed from the DOM\r\nwhen trying to perform an action on it. For some
reference,
see\r\nhttps://github.com//pull/140427\r\n\r\nImprovements:\r\n-
the part that was failing is wrapped inside the `retryOnStale`
helper:\r\n602f2294fddb9bee8b69ebf2fd8382e9f025d59d\r\n**note:**
actually the test fails have started in December, 2023, but\r\nthe line
where the fail was in the last test runs were added in May,\r\n2024
(#183471). unfortunately,
the\r\nlog artifacts from 2023 are already removed from Buildkite, so
no\r\ncertainty on what happened back then\r\n- another suspicious part
was wrapped as well:\r\nec8c5cfd94812c8e5b357e00aac8bfae93ceecf4
and\r\ne5245ad010a02527105a56973465a25feb52ec85\r\n- and as an extra,
wait for page
load:\r\n7cd867fcb9489b24e79066dce750a2381af93d7d\r\n\r\nflaky 50/50 ✅
but this doesn't mean much, as this issue happens quite\r\nrarely
¯\\\\(◉‿◉)/¯\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are
not applicable to this PR.\r\n\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"f151e2ccaa55cc5e13740f49e88c323c0e1d8f6d","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Defend
Workflows","backport:prev-major"],"title":"[EDR Workflows] Unskip and
fix flaky endpoint exceptions
FTR","number":197457,"url":"https://github.com/elastic/kibana/pull/197457","mergeCommit":{"message":"[EDR
Workflows] Unskip and fix flaky endpoint exceptions FTR (#197457)\n\n##
Summary\r\n\r\ncloses #173184 \r\ncloses #173441\r\ncloses
#196003\r\n\r\nThis PR tries to improve on the
`StaleElementReferenceError` happening\r\nin Endpoint Exception
tests.\r\n\r\nThis error is thrown if an element has already been
removed from the DOM\r\nwhen trying to perform an action on it. For some
reference,
see\r\nhttps://github.com//pull/140427\r\n\r\nImprovements:\r\n-
the part that was failing is wrapped inside the `retryOnStale`
helper:\r\n602f2294fddb9bee8b69ebf2fd8382e9f025d59d\r\n**note:**
actually the test fails have started in December, 2023, but\r\nthe line
where the fail was in the last test runs were added in May,\r\n2024
(#183471). unfortunately,
the\r\nlog artifacts from 2023 are already removed from Buildkite, so
no\r\ncertainty on what happened back then\r\n- another suspicious part
was wrapped as well:\r\nec8c5cfd94812c8e5b357e00aac8bfae93ceecf4
and\r\ne5245ad010a02527105a56973465a25feb52ec85\r\n- and as an extra,
wait for page
load:\r\n7cd867fcb9489b24e79066dce750a2381af93d7d\r\n\r\nflaky 50/50 ✅
but this doesn't mean much, as this issue happens quite\r\nrarely
¯\\\\(◉‿◉)/¯\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are
not applicable to this PR.\r\n\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"f151e2ccaa55cc5e13740f49e88c323c0e1d8f6d"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197457","number":197457,"mergeCommit":{"message":"[EDR
Workflows] Unskip and fix flaky endpoint exceptions FTR (#197457)\n\n##
Summary\r\n\r\ncloses #173184 \r\ncloses #173441\r\ncloses
#196003\r\n\r\nThis PR tries to improve on the
`StaleElementReferenceError` happening\r\nin Endpoint Exception
tests.\r\n\r\nThis error is thrown if an element has already been
removed from the DOM\r\nwhen trying to perform an action on it. For some
reference,
see\r\nhttps://github.com//pull/140427\r\n\r\nImprovements:\r\n-
the part that was failing is wrapped inside the `retryOnStale`
helper:\r\n602f2294fddb9bee8b69ebf2fd8382e9f025d59d\r\n**note:**
actually the test fails have started in December, 2023, but\r\nthe line
where the fail was in the last test runs were added in May,\r\n2024
(#183471). unfortunately,
the\r\nlog artifacts from 2023 are already removed from Buildkite, so
no\r\ncertainty on what happened back then\r\n- another suspicious part
was wrapped as well:\r\nec8c5cfd94812c8e5b357e00aac8bfae93ceecf4
and\r\ne5245ad010a02527105a56973465a25feb52ec85\r\n- and as an extra,
wait for page
load:\r\n7cd867fcb9489b24e79066dce750a2381af93d7d\r\n\r\nflaky 50/50 ✅
but this doesn't mean much, as this issue happens quite\r\nrarely
¯\\\\(◉‿◉)/¯\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are
not applicable to this PR.\r\n\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"f151e2ccaa55cc5e13740f49e88c323c0e1d8f6d"}}]}]
BACKPORT-->

Co-authored-by: Gergő Ábrahám <gergo.abraham@elastic.co>
@gergoabraham gergoabraham deleted the unskip-and-fix-flaky-endpoint-exceptions-ftr branch October 25, 2024 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment