-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] Improve logging for FTR test
retry
function (#1…
…76316) ## Summary **Fixes:** - #175481 - #175250 ### Description Improves logging for the `retry` FTR integration testing utility that is used to wrap helpers that make endpoint calls or direct Elasticsearch operations. The previous logging would only explain that the maximum amount of retries had been reached, with the actual error caused in the test being lost, which proved hard to debug. These changes catches the error and log it, allowing us to understand why a retried test failed. Error now reported as: ``` [00:00:19] │ERROR Retrying installPrebuiltRulesPackageByVersion: Error: expected 500 "Internal Server Error", got 200 "OK" [00:00:19] │ debg --- retry.tryForTime failed again with the same message... [00:00:19] │ERROR Reached maximum number of retries for test: 2/2 [00:00:19] └- ✖ fail: Rules Management - Prebuilt Rules - Update Prebuilt Rules Package @ess @serverless @skipInQA update_prebuilt_rules_package should allow user to install prebuilt rules from scratch, then install new rules and upgrade existing rules from the new package [00:00:19] │ Error: "Reached maximum number of retries for test: 2/2" [00:00:19] │ at block (retry.ts:72:16) [00:00:19] │ at runAttempt (retry_for_success.ts:29:21) [00:00:19] │ at retryForSuccess (retry_for_success.ts:79:27) [00:00:19] │ at RetryService.tryForTime (retry.ts:23:12) [00:00:19] │ at retry (retry.ts:62:20) [00:00:19] │ at installPrebuiltRulesPackageByVersion (install_fleet_package_by_url.ts:77:25) [00:00:19] │ at Context.<anonymous> (update_prebuilt_rules_package.ts:106:46) [00:00:19] │ at Object.apply (wrap_function.js:73:16) ``` Main error is still `"Reached maximum number of retries for test: 2/2"`, but now additional logging of exactly **what failed in the test** is error-logged as seen above: `ERROR Retrying installPrebuiltRulesPackageByVersion: Error: expected 500 "Internal Server Error", got 200 "OK"` **Flaky test run:** - Shared 50 and 50: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5068 - Ess 100 runs: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5091 - Serverless 100 runs: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5092 ### 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)
- Loading branch information
Showing
7 changed files
with
43 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters