From 54d2ebb15698f0725e7f9d0ee26082a3c0ce0f3b Mon Sep 17 00:00:00 2001 From: Miki Date: Mon, 5 Feb 2024 16:07:58 -0800 Subject: [PATCH] Clean up post-rebase artifacts Signed-off-by: Miki --- src/core/server/saved_objects/import/check_conflicts.ts | 1 + src/core/server/saved_objects/import/create_saved_objects.ts | 1 - src/core/server/saved_objects/import/import_saved_objects.ts | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) 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]);