[Advanced Settings] Add retry for 409 conflicts in API integration tests#189813
Conversation
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#6679[✅] x-pack/test/api_integration/apis/management/config.ts: 200/200 tests passed. |
|
Pinging @elastic/kibana-management (Team:Kibana Management) |
sabarasaba
left a comment
There was a problem hiding this comment.
Thanks a lot for patching this up @ElenaStoeva! Code changes lgtm, the only thing I wanted to get your opinion on is if you think the retry_if_conflicts util might be useful somewhere else at some point? Otherwise might be worth to move to a common folder
|
Thanks for the review @sabarasaba!
Good call! This util may be useful somewhere else but I'm not sure where exactly since this is for a bit specific case where the called API uses saved objects under the hood. I looked into the test directory structure but I didn't find a place where it made sense to me to move this file to. Do you have any specific location in mind? |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @ElenaStoeva |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
…sts (elastic#189813) Fixes elastic#176445 Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6679 This PR fixes the advanced settings API integration tests that seem to be flaky. The reason for the occasional failures is most likely a `version_conflict_engine_exception` which is thrown when another node indexes the same documents. This can happen when we save an advanced setting since the settings API uses saved objects under the hood, and in CI, multiple nodes can try to save an advanced setting simultaneously. The solution in this PR is to retry the request if we encounter a 409 error. This is adapted from the solution in elastic#174185 which resolves a similar failure. (cherry picked from commit cc29eea)
…sts (elastic#189813) Fixes elastic#176445 Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6679 This PR fixes the advanced settings API integration tests that seem to be flaky. The reason for the occasional failures is most likely a `version_conflict_engine_exception` which is thrown when another node indexes the same documents. This can happen when we save an advanced setting since the settings API uses saved objects under the hood, and in CI, multiple nodes can try to save an advanced setting simultaneously. The solution in this PR is to retry the request if we encounter a 409 error. This is adapted from the solution in elastic#174185 which resolves a similar failure. (cherry picked from commit cc29eea)
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Fixes #176445
Summary
Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6679
This PR fixes the advanced settings API integration tests that seem to be flaky. The reason for the occasional failures is most likely a
version_conflict_engine_exceptionwhich is thrown when another node indexes the same documents. This can happen when we save an advanced setting since the settings API uses saved objects under the hood, and in CI, multiple nodes can try to save an advanced setting simultaneously.The solution in this PR is to retry the request if we encounter a 409 error. This is adapted from the solution in #174185 which resolves a similar failure.