-
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
[ResponseOps][Alerting] Flaky test x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/telemetry/index·ts #161096
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
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.
Generally LGTM. I'd like to get the equal
-> gte
change in the getEventLog() call - that feels like it could someday go flaky.
The others I'm not so sure about. Mainly because I'm missing some context. Could you provide some comments in the PR for:
- why the originating issues were flaky
- why they aren't flaky anymore
- it seems like we removed some rules being tested - I'm curious why
...api_integration/security_and_spaces/group2/tests/telemetry/alerting_and_actions_telemetry.ts
Outdated
Show resolved
Hide resolved
@@ -299,12 +262,10 @@ export default function createAlertingAndActionsTelemetryTests({ getService }: F | |||
|
|||
// number of rule executions - just checking for non-zero as we can't set an exact number | |||
// each rule should have had a chance to execute once | |||
expect(telemetry.count_rules_executions_per_day >= 21).to.be(true); | |||
expect(telemetry.count_rules_executions_per_day >= 0).to.be(true); |
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.
Unfortunate to have to leave that at potentially zero! Looking at the code, I think we'd have to call getEventLog()
on every rule, to make sure it has at least one execute, before requesting the telemetry. Then we could use the number of rules instead of zero.
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 can look into this too and see if I can use the number of rules!
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.
Resolved in this commit a273697
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.
Changing this to non 0 caused the test to be flaky again, I'd like to just leave leave it as > 0
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.
heh, no problem!
...api_integration/security_and_spaces/group2/tests/telemetry/alerting_and_actions_telemetry.ts
Outdated
Show resolved
Hide resolved
The original test was flaky from this block of code for both actions and alerting telemetry
The number of
I simplified the test, added the object remover, and updated the code block above to remove the flaky parts I mentioned.
I removed some rules to help clean up the test, I thought it was a hard to understand and some of the rules seemed to be verifying redundant things. I only kept the minimal amount of rules I needed to verify the telemetry results. |
…to flaky-test/telemetry
…to flaky-test/telemetry
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
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 changes (and attempts at changes!)
…on/security_and_spaces/group2/tests/telemetry/index·ts (elastic#161096) Resolves elastic#140973 Resolves elastic#136153 ## Summary Fixes a telemetry bug and a flaky telemetry test ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2717 x 250 https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2718 x 250
Resolves #140973
Resolves #136153
Summary
Fixes a telemetry bug and a flaky telemetry test
Checklist
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2717 x 250
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2718 x 250