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 bulk disable task test #144739

Closed
wants to merge 21 commits into from

Conversation

ersin-erdal
Copy link
Contributor

fixes: #141849

@ersin-erdal ersin-erdal added release_note:fix Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.6.0 labels Nov 7, 2022
@ersin-erdal ersin-erdal changed the title [Fix] bulk disable task flaky test [Fix] flaky bulk disable task test Nov 8, 2022
@pmuellr
Copy link
Member

pmuellr commented Nov 11, 2022

I think this might be part of the problem. We throw away the results of the bulk update:

await this.taskManager.bulkDisable([attributes.scheduledTaskId]);

If you imagine that one of the updates fails, we'll never know.

We'll need to figure out what we want to return here. Probably a list of the tasks that were attempted to be disabled, and the result of trying to update them.

The reason an individual one might fail is OCC. The task SO doc will get updated when the task runs, so maybe there's some ordering where the task doc gets updated while the disable is taking place? That update will fail, but we don't return the status.

You can see OCC (with the version property) in use, and a refresh: false, here:

updatedSavedObject = await this.savedObjectsRepository.update<SerializedConcreteTaskInstance>(
'task',
doc.id,
attributes,
{
refresh: false,
version: doc.version,
}
);

Once we have a proper result for this API, I think this may need a more elaborate fix, where if we try to disable X rules but only Y end up disabled, then we retry the other ones a few times, like the other OCC wrappers we have. We could still have some failures with some tasks, but at least we'd retry a few times.

@pmuellr
Copy link
Member

pmuellr commented Nov 16, 2022

I opened #145316 since I think there's a chance that's what's causing the failures. I think we should probably block this one, till we get that issue resolved.

@kibana-ci
Copy link
Collaborator

kibana-ci commented Nov 17, 2022

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should have proper callCluster and savedObjectsClient authorization for action type executor when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should have proper callCluster and savedObjectsClient authorization for action type executor when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should have proper callCluster and savedObjectsClient authorization for action type executor when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should have proper callCluster and savedObjectsClient authorization for action type executor when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should have proper callCluster and savedObjectsClient authorization for alert type executor when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should have proper callCluster and savedObjectsClient authorization for alert type executor when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should have proper callCluster and savedObjectsClient authorization for alert type executor when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should have proper callCluster and savedObjectsClient authorization for alert type executor when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should not throttle when changing groups
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should not throttle when changing groups
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should not throttle when changing groups
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should not throttle when changing groups
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should pass updated alert params to executor
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should pass updated alert params to executor
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should pass updated alert params to executor
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should pass updated alert params to executor
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should reset throttle window when not firing
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should reset throttle window when not firing
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should reset throttle window when not firing
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should reset throttle window when not firing
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should schedule task, run alert and schedule actions when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should schedule task, run alert and schedule actions when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should schedule task, run alert and schedule actions when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should schedule task, run alert and schedule actions when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should schedule task, run alert and schedule preconfigured actions when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should schedule task, run alert and schedule preconfigured actions when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should schedule task, run alert and schedule preconfigured actions when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should schedule task, run alert and schedule preconfigured actions when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should throttle alerts when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should throttle alerts when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should throttle alerts when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 should throttle alerts when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 shouldn't schedule actions when alert is muted
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 shouldn't schedule actions when alert is muted
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 shouldn't schedule actions when alert is muted
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts space_1_all at space1 shouldn't schedule actions when alert is muted
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should have proper callCluster and savedObjectsClient authorization for action type executor when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should have proper callCluster and savedObjectsClient authorization for action type executor when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should have proper callCluster and savedObjectsClient authorization for action type executor when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should have proper callCluster and savedObjectsClient authorization for action type executor when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should have proper callCluster and savedObjectsClient authorization for alert type executor when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should have proper callCluster and savedObjectsClient authorization for alert type executor when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should have proper callCluster and savedObjectsClient authorization for alert type executor when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should have proper callCluster and savedObjectsClient authorization for alert type executor when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should not throttle when changing groups
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should not throttle when changing groups
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should not throttle when changing groups
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should not throttle when changing groups
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should pass updated alert params to executor
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should pass updated alert params to executor
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should pass updated alert params to executor
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should pass updated alert params to executor
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should reset throttle window when not firing
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should reset throttle window when not firing
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should reset throttle window when not firing
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should reset throttle window when not firing
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should schedule task, run alert and schedule actions when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should schedule task, run alert and schedule actions when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should schedule task, run alert and schedule actions when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should schedule task, run alert and schedule actions when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should schedule task, run alert and schedule preconfigured actions when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should schedule task, run alert and schedule preconfigured actions when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should schedule task, run alert and schedule preconfigured actions when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should schedule task, run alert and schedule preconfigured actions when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should throttle alerts when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should throttle alerts when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should throttle alerts when appropriate
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should throttle alerts when appropriate
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should unmute all instances when unmuting an alert
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should unmute all instances when unmuting an alert
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should unmute all instances when unmuting an alert
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 should unmute all instances when unmuting an alert
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 shouldn't schedule actions when alert instance is muted
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 shouldn't schedule actions when alert instance is muted
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 shouldn't schedule actions when alert instance is muted
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 shouldn't schedule actions when alert instance is muted
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 shouldn't schedule actions when alert is muted
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 shouldn't schedule actions when alert is muted
  • [job] [logs] FTR Configs #7 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 shouldn't schedule actions when alert is muted
  • [job] [logs] FTR Configs #9 / alerting api integration security and spaces enabled - Group 2 Alerts alerts alerts superuser at space1 shouldn't schedule actions when alert is muted
  • [job] [logs] FTR Configs #4 / alerting api integration spaces only Alerting scheduled task id for migrated rules - sets scheduled task id to match rule id when rule is disabled then enabled
  • [job] [logs] FTR Configs #4 / alerting api integration spaces only Alerting scheduled task id for migrated rules - sets scheduled task id to match rule id when rule is disabled then enabled
  • [job] [logs] Jest Tests #1 / disable() throws when unsecuredSavedObjectsClient update fails
  • [job] [logs] Jest Tests #1 / rules_client_conflict_retries 1 retry works for method disable
  • [job] [logs] Jest Tests #1 / rules_client_conflict_retries 3 retries fails with conflict error disable
  • [job] [logs] test/functional/config.firefox.js / visualize app visual builder Time Series basics Clicking on the chart should create a filter
  • [job] [logs] test/functional/config.firefox.js / visualize app visual builder Time Series basics Clicking on the chart should create a filter
  • [job] [logs] test/functional/config.firefox.js / visualize app visual builder Time Series basics Clicking on the chart should create a filter for series with multiple split by terms fields one of which has formatting
  • [job] [logs] test/functional/config.firefox.js / visualize app visual builder Time Series basics Clicking on the chart should create a filter for series with multiple split by terms fields one of which has formatting
  • [job] [logs] test/functional/config.firefox.js / visualize app visual builder Time Series Elastic charts Hiding series should hide series by legend item click
  • [job] [logs] test/functional/config.firefox.js / visualize app visual builder Time Series Elastic charts Hiding series should hide series by legend item click
  • [job] [logs] test/functional/config.firefox.js / visualize app visual builder Time Series Elastic charts Hiding series should keep series hidden after refresh
  • [job] [logs] test/functional/config.firefox.js / visualize app visual builder Time Series Elastic charts Hiding series should keep series hidden after refresh
  • [job] [logs] test/functional/config.firefox.js / visualize app visual builder Time Series Elastic charts should display correct chart data, label names and area colors for min aggregation when split by filters
  • [job] [logs] test/functional/config.firefox.js / visualize app visual builder Time Series Elastic charts should display correct chart data, label names and area colors for min aggregation when split by filters
  • [job] [logs] test/functional/config.firefox.js / visualize app visual builder Time Series Elastic charts should display correct chart data, label names and area colors for sum aggregation when split by terms
  • [job] [logs] test/functional/config.firefox.js / visualize app visual builder Time Series Elastic charts should display correct chart data, label names and area colors for sum aggregation when split by terms

Metrics [docs]

Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 108 113 +5
securitySolution 441 447 +6
total +19

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 67 73 +6
osquery 109 115 +6
securitySolution 518 524 +6
total +20

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment