-
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
Fixes flaky backfill tests. #198592
Fixes flaky backfill tests. #198592
Conversation
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#7317[❌] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts: 173/200 tests passed. |
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#7319[❌] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts: 171/200 tests passed. |
ad9868d
to
f0e94ce
Compare
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#7320[❌] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts: 174/200 tests passed. |
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#7322[❌] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts: 175/200 tests passed. |
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#7326[❌] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts: 172/200 tests passed. |
639da5a
to
d8ac15a
Compare
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7327[✅] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts: 100/100 tests passed. |
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#7328[❌] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts: 172/200 tests passed. |
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#7336[❌] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts: 170/200 tests passed. |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7338[✅] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts: 200/200 tests passed. |
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#7342[❌] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts: 173/200 tests passed. |
e89908f
to
e2344f8
Compare
@@ -263,11 +263,11 @@ export default function apiKeyBackfillTests({ getService }: FtrProviderContext) | |||
} | |||
}); | |||
|
|||
// invoke the invalidate task | |||
await runInvalidateTask(); | |||
|
|||
// pending API key should now be deleted because backfill is done | |||
await retry.try(async () => { |
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.
Seems like sometimes the last API key is not invalidated so moving this into the retry loop to retry to invalidate task as well.
@@ -759,7 +759,7 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext | |||
}); | |||
|
|||
it('should handle schedule request where some requests succeed and some requests fail appropriately', async () => { | |||
const start = moment().utc().startOf('day').subtract(7, 'days').toISOString(); | |||
const start = moment().utc().startOf('day').subtract(14, 'days').toISOString(); |
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.
increasing the length of the backfill run because occasionally, checking AAD at the end of the this test would return a saved object not found error.
@@ -167,7 +166,7 @@ export default function createBackfillTaskRunnerTests({ getService }: FtrProvide | |||
objectRemover.add(spaceId, ruleId, 'rule', 'alerting'); | |||
|
|||
const start = moment(originalDocTimestamps[1]).utc().startOf('day').toISOString(); | |||
const end = moment().utc().startOf('day').subtract(9, 'days').toISOString(); | |||
const end = moment(originalDocTimestamps[11]).utc().startOf('day').toISOString(); |
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.
fixing the end timestamp so it relates to the doc timestamps and not to the current time.
💚 Build Succeeded
Metrics [docs]
|
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#7345[❌] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts: 173/200 tests passed. |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7346[✅] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts: 200/200 tests passed. |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7347[✅] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts: 200/200 tests passed. |
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.
Changes LGTM!
Starting backport for target branches: 8.x |
Resolves elastic#192144 Resolves elastic#198168 Resolves elastic#197239 ## Summary Minor fixes to the backfill functional tests to try to reduce flakiness. (cherry picked from commit 705c503)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [Fixes flaky backfill tests. (#198592)](#198592) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ying Mao","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-07T12:49:36Z","message":"Fixes flaky backfill tests. (#198592)\n\nResolves https://github.com/elastic/kibana/issues/192144\r\nResolves https://github.com/elastic/kibana/issues/198168\r\nResolves https://github.com/elastic/kibana/issues/197239\r\n\r\n## Summary\r\n\r\nMinor fixes to the backfill functional tests to try to reduce flakiness.","sha":"705c503182bce91aa8b717febe508ba29ca2d8c6","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Alerting","release_note:skip","Team:ResponseOps","v9.0.0","backport:prev-minor","v8.17.0"],"title":"Fixes flaky backfill tests.","number":198592,"url":"https://github.com/elastic/kibana/pull/198592","mergeCommit":{"message":"Fixes flaky backfill tests. (#198592)\n\nResolves https://github.com/elastic/kibana/issues/192144\r\nResolves https://github.com/elastic/kibana/issues/198168\r\nResolves https://github.com/elastic/kibana/issues/197239\r\n\r\n## Summary\r\n\r\nMinor fixes to the backfill functional tests to try to reduce flakiness.","sha":"705c503182bce91aa8b717febe508ba29ca2d8c6"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198592","number":198592,"mergeCommit":{"message":"Fixes flaky backfill tests. (#198592)\n\nResolves https://github.com/elastic/kibana/issues/192144\r\nResolves https://github.com/elastic/kibana/issues/198168\r\nResolves https://github.com/elastic/kibana/issues/197239\r\n\r\n## Summary\r\n\r\nMinor fixes to the backfill functional tests to try to reduce flakiness.","sha":"705c503182bce91aa8b717febe508ba29ca2d8c6"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Ying Mao <[email protected]>
Resolves elastic#192144 Resolves elastic#198168 Resolves elastic#197239 ## Summary Minor fixes to the backfill functional tests to try to reduce flakiness.
Resolves #192144
Resolves #198168
Resolves #197239
Summary
Minor fixes to the backfill functional tests to try to reduce flakiness.