Skip to content

Commit

Permalink
[ResponseOps][rule registry] Remove usages of refresh: true (#159252)
Browse files Browse the repository at this point in the history
Resolves #158139

## Summary

Removes refresh: true from the rule registry


### 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
  • Loading branch information
doakalexi committed Jun 12, 2023
1 parent 3164006 commit 679dc80
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,6 @@ export class AlertsClient {
const result = await this.esClient.updateByQuery({
index,
conflicts: 'proceed',
refresh: true,
body: {
script: {
source: `if (ctx._source['${ALERT_WORKFLOW_STATUS}'] != null) {
Expand Down Expand Up @@ -929,7 +928,6 @@ export class AlertsClient {
await this.esClient.updateByQuery({
index,
conflicts: 'proceed',
refresh: true,
body: {
script: {
source: painlessScript,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ describe('remove cases from alerts', () => {
"conflicts": "proceed",
"ignore_unavailable": true,
"index": "undefined-*",
"refresh": true,
}
`);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export const createPersistenceRuleTypeWrapper: CreatePersistenceRuleTypeWrapper

const bulkResponse = await ruleDataClientWriter.bulk({
body: [...duplicateAlertUpdates, ...mapAlertsToBulkCreate(augmentedAlerts)],
refresh: true,
refresh: 'wait_for',
});

if (bulkResponse == null) {
Expand Down

0 comments on commit 679dc80

Please sign in to comment.