-
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
[Alerting] Fixing Failing test: X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/rbac_legacy·ts - alerting api integration security and spaces enabled Alerts legacy alerts alerts superuser at space1 should schedule actions on legacy alerts #92549
Conversation
…-test-legacy-alert
…-test-legacy-alert
…-test-legacy-alert
…-test-legacy-alert
…-test-legacy-alert
…-test-legacy-alert
…-test-legacy-alert
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
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.
Code LGTM! We'll be able to remove these legacy tests with https://github.com/elastic/kibana/issues/90386 relatively soon :-)
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
….x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/rbac_legacy·ts - alerting api integration security and spaces enabled Alerts legacy alerts alerts superuser at space1 should schedule actions on legacy alerts (elastic#92549) * Unskipping test * Increasing runAt time * Increasing runAt time * Logging * Increasing wait time even more * Removing logs * Resetting task status * Re-enabling all tests * Re-enabling all tests * Adding comment
….x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/rbac_legacy·ts - alerting api integration security and spaces enabled Alerts legacy alerts alerts superuser at space1 should schedule actions on legacy alerts (#92549) (#92690) * Unskipping test * Increasing runAt time * Increasing runAt time * Logging * Increasing wait time even more * Removing logs * Resetting task status * Re-enabling all tests * Re-enabling all tests * Adding comment Co-authored-by: ymao1 <ying.mao@elastic.co>
Resolves #86952
Summary
This test was flaky due to a race condition when loading legacy alerts and task manager tasks from es archiver and migrating them. When the task manager tasks have finished migrating, task manager starts running them right away. If the kibana index was mid-migration, the task manager would try to look up an alert and get this error
Saved object index alias [.kibana_8.0.0] not found: index_not_found_exception
. This error would cause the task to set status tofailed
and not try to rerun the alert, which means downstream tests that depend on the alert executing would then fail.I am mitigating this issue by resetting the task status to
idle
, meaning the task manager would be able to continue picking up this task.Verified with Rudolph that this is a limitation of the functional tests and this should not happen in Kibana since task manager does not start polling until after all plugin setup (when migrations are run) are complete.
Successful flaky test runs:
Checklist
Delete any items that are not applicable to this PR.