-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix flaky security/spaces tests #108088
Fix flaky security/spaces tests #108088
Conversation
This prevents flaky behavior for integration tests. When an object has conflicts with multiple destinations, we explicitly sort by updated_at (desc) and then by id (asc). Before, we implicitly relied on ES to sort by updated_at (desc), which seems to work, but if both objects had an identical updated_at then their sort order could differ depending on some unknown factor.
This unskips the delete space integration tests and changes the assertions to ignore config objects. Those don't behave like normal saved objects and we can't always rely on them existing for each test case.
Also removed some dead code.
@jportner I find running the flaky test runner very useful for making sure my fix removed the flakiness |
Thanks, I've kicked off the runner for my branch (https://kibana-ci.elastic.co/job/kibana+flaky-test-suite-runner/1805/). Both of the problematic tests are in |
@Bamieh The flaky test runner passed, this is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
if (fail409Param === 'ambiguous_conflict_1a1b') { | ||
// "ambiguous source" conflict | ||
error = { | ||
type: 'ambiguous_conflict', | ||
destinations: [getConflictDest(`${CID}1`)], | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to mention:
This was dead code from the draft implementation of #75444; I originally had an "ambiguous source conflict" test case, but we decided to randomize object IDs in that scenario instead of throwing an error. At the time, I changed the individual test cases accordingly, but I forgot to rip out this now-unused portion of code from the common suite.
So, I saw it here and decided to remove it now 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for fixing these tests!
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Resolves #92358 and #106698.
Passed the flaky test runner: https://kibana-ci.elastic.co/job/kibana+flaky-test-suite-runner/1805/