[File data visualizer] Removing file upload retries (#123696) (#123790)

(cherry picked from commit 3797b78ce7)

# Conflicts:
#	x-pack/plugins/file_upload/server/import_data.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
James Gowdy 2022-02-11 11:29:14 +00:00 committed by GitHub
parent 2fb14e2328
commit 38eeef6995
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View file

@ -14,10 +14,13 @@ export async function analyzeFile(
overrides: InputOverrides
): Promise<AnalysisResult> {
overrides.explain = overrides.explain === undefined ? 'true' : overrides.explain;
const { body } = await client.asInternalUser.textStructure.findStructure({
body: data,
...overrides,
});
const { body } = await client.asInternalUser.textStructure.findStructure(
{
body: data,
...overrides,
},
{ maxRetries: 0 }
);
const { hasOverrides, reducedOverrides } = formatOverrides(overrides);

View file

@ -103,7 +103,7 @@ export function importDataProvider({ asCurrentUser }: IScopedClusterClient) {
body.settings = settings;
}
await asCurrentUser.indices.create({ index, body });
await asCurrentUser.indices.create({ index, body }, { maxRetries: 0 });
}
async function indexData(index: string, pipelineId: string, data: InputData) {
@ -119,7 +119,7 @@ export function importDataProvider({ asCurrentUser }: IScopedClusterClient) {
settings.pipeline = pipelineId;
}
const { body: resp } = await asCurrentUser.bulk(settings);
const { body: resp } = await asCurrentUser.bulk(settings, { maxRetries: 0 });
if (resp.errors) {
throw resp;
} else {