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] Add retryIfConflict util for 409 conflicts in Integration tests (#174185) #174762

Merged
merged 4 commits into from
Jan 15, 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

… Integration tests (elastic#174185)

## Summary

Fixes: elastic#171428

**NOTE: the test where this was reported wasn't skipped, so this PR does
not unskip any tests.** However, the Flaky Test Runs help us determine
that the issue is no longer reproducible.

The `deleteAllPrebuiltRuleAssets` utility reported a `409 Conflict`,
presumably from `security-rule` assets that were attempted to be deleted
while they were being updated by a parallel process.

This PR wraps the `es.deleteByQuery` calls in the utils
`deleteAllPrebuiltRuleAssets` and `deleteAllTimelines` with a new
`retryIfConflict` helper, that will retry the operation if the ES
request fails with a `409`.

## Flaky test run

`bundled_prebuilt_rules_package` - **ESS** and **Serverless**:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4790

`large_prebuilt_rules_package` - **ESS** and **Serverless**:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4791

`update_prebuilt_rules_package` - **ESS** and **Serverless**:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4792

`management` - **ESS** and **Serverless**:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4793

### 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)

(cherry picked from commit b8c7306)

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

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @jpdjere

@jpdjere jpdjere merged commit 24733e5 into elastic:8.12 Jan 15, 2024
28 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.

3 participants