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

[Cases] Fix flaky functional tests #181230

Merged
merged 5 commits into from
Apr 22, 2024

Conversation

cnasikas
Copy link
Member

@cnasikas cnasikas commented Apr 19, 2024

Summary

I ran the flaky test runner multiple times. I did not find any good reason why some of the tests were flaky in the first place.

Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5720, https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5721, https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5727

Fixes: #179016, #178991, #176716, #178690

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@@ -179,10 +179,6 @@ export function CasesTableServiceProvider(
await testSubjects.click(`options-filter-popover-item-${status}`);
// to close the popup
await testSubjects.click('options-filter-popover-button-status');

await testSubjects.missingOrFail(`options-filter-popover-item-${status}`, {
Copy link
Member Author

Choose a reason for hiding this comment

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

Potentially flaky code. Either way, it is not needed.

@cnasikas cnasikas marked this pull request as ready for review April 21, 2024 16:19
@cnasikas cnasikas requested a review from a team as a code owner April 21, 2024 16:19
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

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
cases 475.7KB 475.8KB +113.0B

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

cc @cnasikas

}

await retry.waitFor(`filterByOwner popover opened`, async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

super nit:

Suggested change
await retry.waitFor(`filterByOwner popover opened`, async () => {
await retry.waitFor('filterByOwner popover opened', async () => {

@@ -753,8 +752,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
expect(await testSubjects.exists('all-cases-clear-filters-link-icon')).to.be(false);
});

// FLAKY: https://github.com/elastic/kibana/issues/176716
describe.skip('assignees filtering', () => {
describe('assignees filtering', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

What about this one? None of the changes in the CasesTableServiceProvider seem to be used here.

Copy link
Member Author

@cnasikas cnasikas Apr 22, 2024

Choose a reason for hiding this comment

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

Yes, I am not sure why it was flaky. I ran the flaky test runner a lot and I did not see any flakyness. I suspect that it was a one time thing issue with the CI.

@cnasikas cnasikas merged commit 8a99299 into elastic:main Apr 22, 2024
19 checks passed
@cnasikas cnasikas deleted the fix_flaky_functional_tests branch April 22, 2024 10:44
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 22, 2024
## Summary

I ran the flaky test runner multiple times. I did not find any good
reason why some of the tests were flaky in the first place.

Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5720,
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5721,
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5727

Fixes: elastic#179016,
elastic#178991,
elastic#176716,
elastic#178690

### Checklist

Delete any items that are not applicable to this PR.

- [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
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

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

💚 All backports created successfully

Status Branch Result
8.14

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 Apr 22, 2024
# Backport

This will backport the following commits from `main` to `8.14`:
- [[Cases] Fix flaky functional tests
(#181230)](#181230)

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

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

<!--BACKPORT [{"author":{"name":"Christos
Nasikas","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-04-22T10:44:19Z","message":"[Cases]
Fix flaky functional tests (#181230)\n\n## Summary\r\n\r\nI ran the
flaky test runner multiple times. I did not find any good\r\nreason why
some of the tests were flaky in the first place.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5720,\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5721,\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5727\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/179016,\r\nhttps://github.com/elastic/kibana/issues/178991,\r\nhttps://github.com/elastic/kibana/issues/176716,\r\nhttps://github.com/elastic/kibana/issues/178690\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\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### For maintainers\r\n\r\n- [x]
This was checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"8a992997e9f942b39182a087df44604dc69957cf","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Cases","v8.14.0","v8.15.0"],"title":"[Cases]
Fix flaky functional
tests","number":181230,"url":"https://github.com/elastic/kibana/pull/181230","mergeCommit":{"message":"[Cases]
Fix flaky functional tests (#181230)\n\n## Summary\r\n\r\nI ran the
flaky test runner multiple times. I did not find any good\r\nreason why
some of the tests were flaky in the first place.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5720,\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5721,\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5727\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/179016,\r\nhttps://github.com/elastic/kibana/issues/178991,\r\nhttps://github.com/elastic/kibana/issues/176716,\r\nhttps://github.com/elastic/kibana/issues/178690\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\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### For maintainers\r\n\r\n- [x]
This was checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"8a992997e9f942b39182a087df44604dc69957cf"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/181230","number":181230,"mergeCommit":{"message":"[Cases]
Fix flaky functional tests (#181230)\n\n## Summary\r\n\r\nI ran the
flaky test runner multiple times. I did not find any good\r\nreason why
some of the tests were flaky in the first place.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5720,\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5721,\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5727\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/179016,\r\nhttps://github.com/elastic/kibana/issues/178991,\r\nhttps://github.com/elastic/kibana/issues/176716,\r\nhttps://github.com/elastic/kibana/issues/178690\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\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### For maintainers\r\n\r\n- [x]
This was checked for breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"8a992997e9f942b39182a087df44604dc69957cf"}}]}]
BACKPORT-->

Co-authored-by: Christos Nasikas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment