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

Fix flaky RBAC Legacy test due to archive containing tasks and rules together #153803

Merged
merged 7 commits into from
Mar 29, 2023

Conversation

mikecote
Copy link
Contributor

@mikecote mikecote commented Mar 27, 2023

Resolves #153800
Resolves #142704
Resolves #153801
Resolves #142947
Resolves #140867

Similar to #152841 (comment), the rule and tasks archives don't seem to play nicely when combined. The flakiness goes away when loading the rules then the tasks in sequence. Otherwise, the tasks sometimes run before it can find the rule, causing the task to delete itself.

I took a look at why the task would run an not be able to find the rule. My best guess after looking at a failing flaky test is that the task manager migration completes before the .kibana. And while .kibana migrates, the task runs and fails to load the task because the .kibana index is in an interim state.

Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2045

@mikecote mikecote added release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework v8.8.0 labels Mar 27, 2023
@mikecote mikecote self-assigned this Mar 27, 2023
@mikecote
Copy link
Contributor Author

@elasticmachine merge upstream

@mikecote
Copy link
Contributor Author

@elasticmachine merge upstream

@mikecote
Copy link
Contributor Author

@elasticmachine merge upstream

@mikecote
Copy link
Contributor Author

@elasticmachine merge upstream

@mikecote
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 433 436 +3

Total ESLint disabled count

id before after diff
securitySolution 513 516 +3

History

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

cc @mikecote

@mikecote mikecote marked this pull request as ready for review March 29, 2023 10:53
@mikecote mikecote requested a review from a team as a code owner March 29, 2023 10:53
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

Copy link
Contributor

@ymao1 ymao1 left a comment

Choose a reason for hiding this comment

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

LGTM

@mikecote mikecote merged commit e13f1c5 into elastic:main Mar 29, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Mar 29, 2023
jgowdyelastic pushed a commit to jgowdyelastic/kibana that referenced this pull request Mar 30, 2023
…together (elastic#153803)

Resolves elastic#153800
Resolves elastic#142704
Resolves elastic#153801
Resolves elastic#142947
Resolves elastic#140867

Similar to
elastic#152841 (comment),
the rule and tasks archives don't seem to play nicely when combined. The
flakiness goes away when loading the rules then the tasks in sequence.
Otherwise, the tasks sometimes run before it can find the rule, causing
the task to delete itself.

I took a look at why the task would run an not be able to find the rule.
My best guess after looking at a failing flaky test is that the task
manager migration completes before the .kibana. And while .kibana
migrates, the task runs and fails to load the task because the .kibana
index is in an interim state.

Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2045

---------

Co-authored-by: Kibana Machine <[email protected]>
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 Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.8.0
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Failing test: X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/rbac_legacy·ts - alerting api integration security and spaces enabled - Group 2 Alerts legacy alerts alerts global_read at space1 should schedule actions on legacy alerts Failing test: X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/rbac_legacy·ts - alerting api integration security and spaces enabled - Group 2 Alerts legacy alerts alerts space_1_all_alerts_none_actions at space1 should schedule actions on legacy alerts Failing test: X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/rbac_legacy·ts - alerting api integration security and spaces enabled - Group 2 Alerts legacy alerts alerts space_1_all_with_restricted_fixture at space1 should schedule actions on legacy alerts Failing test: X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/rbac_legacy·ts - alerting api integration security and spaces enabled - Group 2 Alerts legacy alerts alerts space_1_all at space1 should schedule actions on legacy alerts Failing test: X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/rbac_legacy·ts - alerting api integration security and spaces enabled - Group 2 Alerts legacy alerts alerts superuser at space1 should schedule actions on legacy alerts
5 participants