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

This commit is contained in:
James Gowdy 2022-01-25 14:35:21 +00:00 committed by GitHub
parent 3aa72f862d
commit 3797b78ce7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View file

@ -19,10 +19,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

@ -104,7 +104,7 @@ export function importDataProvider({ asCurrentUser }: IScopedClusterClient) {
}
// @ts-expect-error settings.index is not compatible
await asCurrentUser.indices.create({ index, body });
await asCurrentUser.indices.create({ index, body }, { maxRetries: 0 });
}
async function indexData(index: string, pipelineId: string, data: InputData) {
@ -120,7 +120,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 {