diff --git a/src/core/server/saved_objects/import/check_conflicts.ts b/src/core/server/saved_objects/import/check_conflicts.ts index 58435f24d6d2..830f7f55d7c5 100644 --- a/src/core/server/saved_objects/import/check_conflicts.ts +++ b/src/core/server/saved_objects/import/check_conflicts.ts @@ -66,6 +66,7 @@ export async function checkConflicts({ if (objects.length === 0) { return { filteredObjects, errors, importIdMap, pendingOverwrites }; } + const retryMap = retries.reduce( (acc, cur) => acc.set(`${cur.type}:${cur.id}`, cur), new Map() diff --git a/src/core/server/saved_objects/import/create_saved_objects.ts b/src/core/server/saved_objects/import/create_saved_objects.ts index 0a006c11b258..9a0f491c6370 100644 --- a/src/core/server/saved_objects/import/create_saved_objects.ts +++ b/src/core/server/saved_objects/import/create_saved_objects.ts @@ -62,7 +62,6 @@ export const createSavedObjects = async ({ dataSourceTitle, }: CreateSavedObjectsParams): Promise> => { // filter out any objects that resulted in errors - const errorSet = accumulatedErrors.reduce( (acc, { type, id }) => acc.add(`${type}:${id}`), new Set() diff --git a/src/core/server/saved_objects/import/import_saved_objects.ts b/src/core/server/saved_objects/import/import_saved_objects.ts index 576977a34afe..6d017f7a05ef 100644 --- a/src/core/server/saved_objects/import/import_saved_objects.ts +++ b/src/core/server/saved_objects/import/import_saved_objects.ts @@ -110,7 +110,6 @@ export async function importSavedObjectsFromStream({ ]); } - // Check single-namespace objects for conflicts in this namespace, and check multi-namespace objects for conflicts across all namespaces const checkConflictsResult = await checkConflicts(checkConflictsParams); errorAccumulator = [...errorAccumulator, ...checkConflictsResult.errors]; importIdMap = new Map([...importIdMap, ...checkConflictsResult.importIdMap]);