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

[8.12] [Security Solution] Unskip flaky tests in Prebuilt Rules FTR Integration tests (#173998) #174761

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

jpdjere
Copy link
Contributor

@jpdjere jpdjere commented Jan 12, 2024

Backport

This will backport the following commits from main to 8.12:

Questions ?

Please refer to the Backport tool documentation

…ion tests (elastic#173998)

**Addresses:**
elastic#172107
elastic#171380

## Summary

Unskip skipped tests in:

1.
`x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules/bundled_prebuilt_rules_package/install_latest_bundled_prebuilt_rules.ts`
2.
`x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules/management/fleet_integration.ts`

- Makes the `retryDelay` in the **RetryService** in
`packages/kbn-ftr-common-functional-services/services/retry/retry.ts` a
configurable parameter - used in our `retry` util to shorten the wait
period to 200ms.
- Creates `retry` wrapper util for our FTR Integration tests, that wraps
`retry.try` from the **RetryService**, to implement maximum attempts.
- Uses this `retry` wrapper in test utils that install the
`security_detection_engine` Fleet package, and asserts that rules have
been succesfully installed - and retries if they haven't.
- Creates `refreshSavedObjectIndices` reusable util that cleans cache
and refreshes indices. Centralizes comment spread around file into this
single file.
- Use this new util to clean the cache in util that install the Fleet
package, and utils that read the prebuilt rule status.

## Flaky test runner

**Before changes:**
- For both `bundled_prebuilt_rules_package` and `management`:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4688
🟢 (250 and 250 runs)
- `bundled_prebuilt_rules_package`:
- ESS:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4805
(500 runs)
- Serverless:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4807
(500 runs)
- `management`
- ESS:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4806
(500 runs)
- Serverless:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4808
(500 runs)

**After changes:**
- `bundled_prebuilt_rules_package`:
- ESS:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4825
🟢 (500 runs)
- Serverless:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4826
🟢 (500 runs)
- `management`
- ESS:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4827
🟢 (500 runs)
- Serverless:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4828
🟢 (500 runs)

### For maintainers

- [ ] 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: kibanamachine <[email protected]>
(cherry picked from commit 81d6478)

# Conflicts:
#	x-pack/test/security_solution_api_integration/tsconfig.json
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/ftr-common-functional-services 29 31 +2
Unknown metric groups

API count

id before after diff
@kbn/ftr-common-functional-services 29 31 +2

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

@jpdjere jpdjere merged commit 79fe229 into elastic:8.12 Jan 12, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants