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

[Tests] apis UI Counters UI remove dependency on date #170734

Merged
merged 6 commits into from
Nov 14, 2023

Conversation

Bamieh
Copy link
Member

@Bamieh Bamieh commented Nov 7, 2023

Summary

Remove the dependency on serializing the day to find saved objects by id since this seems to be the source of flakiness.

I suspect it has to do with the timing of when the test was run or timezones because the CI was reported on October 3rd at 3 am but the counter shows October 2nd so it is failing to grab the saved object by id.

This change clears all saved objects before each test and searches for matching events by event name and counter name rather than serializing the saved object ID manually to find it.

Closes #98240

  • Tested running this at 3am which is when the failure was happening and it worked
  • Ran CI several times

@Bamieh Bamieh added release_note:skip Skip the PR/issue when compiling release notes v8.12.0 labels Nov 7, 2023
@Bamieh
Copy link
Member Author

Bamieh commented Nov 7, 2023

@elasticmachine merge upstream

@Bamieh Bamieh requested review from afharo and a team November 9, 2023 14:51
@Bamieh
Copy link
Member Author

Bamieh commented Nov 9, 2023

@elasticmachine merge upstream

@Bamieh
Copy link
Member Author

Bamieh commented Nov 14, 2023

@elasticmachine merge upstream

Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

LGTM! It looks like we were setting dayDate at the beginning of the test. So on midnight, some of the tests may run after midnight, and we'd be looking for the previous-day events.

This solution seems more rock-solid.

Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
@Bamieh Bamieh enabled auto-merge (squash) November 14, 2023 12:36
@Bamieh Bamieh merged commit 32d9e22 into elastic:main Nov 14, 2023
@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

@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 14, 2023
@Bamieh Bamieh deleted the fix_ui_counters_flaky branch November 14, 2023 15:06
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 v8.12.0
Projects
None yet
4 participants