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

[Failing Test] Fixes intermittent failures in audit log integration tests #154935

Merged
merged 3 commits into from
Apr 19, 2023

Conversation

jeramysoucy
Copy link
Contributor

@jeramysoucy jeramysoucy commented Apr 13, 2023

resolves #119267

Summary

As discussed in the issue, we believed the issue to be timing between file write and read, however this is not the case. I found that two 'saved_object_find' events were being logged - the expected user one (for a 'dashboard'), and one by the fleet app (for 'epm-packages'). Should the 'epm-packages' event get logged before the 'dashboard' event, the test fails because the first 'saved_object_find' event it finds does not contain the expected user data in the audit. This appears to happen much less frequently in CI than locally for whatever reason.

Fix

I have added additional criteria when looking for the 'saved_object_find' event so it will only find an event for a 'dashboard' object.

Testing

Flaky Test Runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2150

@jeramysoucy jeramysoucy added test-failure-flaky Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! release_note:skip Skip the PR/issue when compiling release notes v8.8.0 labels Apr 13, 2023
@jeramysoucy jeramysoucy marked this pull request as ready for review April 19, 2023 18:15
@jeramysoucy jeramysoucy requested a review from a team as a code owner April 19, 2023 18:15
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

Copy link
Contributor

@thomheymann thomheymann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 394 397 +3

Total ESLint disabled count

id before after diff
securitySolution 474 477 +3

History

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

@jeramysoucy jeramysoucy merged commit 03a2cd7 into elastic:main Apr 19, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! test-failure-flaky v8.8.0
Projects
None yet
5 participants