Skip to content

Commit

Permalink
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
Browse files Browse the repository at this point in the history
…-ref HEAD~1..HEAD --fix'
  • Loading branch information
kibanamachine committed Sep 8, 2023
1 parent 5f8683b commit d044e79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 2 additions & 3 deletions x-pack/plugins/alerting/server/alerts_client/alerts_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import {
getLifecycleAlertsQueries,
getContinualAlertsQuery,
} from './lib';
import { resolveAlertConflicts } from './lib/alert_conflict_resolver';

// Term queries can take up to 10,000 terms
const CHUNK_SIZE = 10000;
Expand Down Expand Up @@ -413,11 +412,11 @@ export class AlertsClient<
} alerts - ${JSON.stringify(errorsInResponse)}`
);

//resolveAlertConflicts({
// resolveAlertConflicts({
// bulkRequest: bulkBody,
// bulkResponse: response,
// esClient,
//});
// });
}
} catch (err) {
this.options.logger.error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,13 @@ export async function resolveAlertConflicts(

const bulkRequest = {
operations: conflictRequest.map((req) => [req.op, req.doc]).flat(),
}
};
return { bulkRequest };
}


// change this to do the mget separately from applying the OCC,
// so we can also use the mget to get the current ad-hoc fields of the alert



/** Update the OCC info in the request via mget. */
async function updateOCC(esClient: ElasticsearchClient, conflictRequests: NormalizedBulkRequest[]) {
const docs: Array<{ _id: string; _index: string }> = [];
Expand Down

0 comments on commit d044e79

Please sign in to comment.