From 81942aef8084da9508f497ffcb03581d2bddb727 Mon Sep 17 00:00:00 2001 From: Lee Danilek Date: Thu, 19 Sep 2024 17:03:08 -0400 Subject: [PATCH] `SerializedComponentDiff::index_diff` is optional (#29976) there are some audit log documents where this field is missing. we could migrate them to have the field, but it's easier to accept that they might not exist and handle it. Should fix db-verifier and also dashboard for these instances. GitOrigin-RevId: 5dbd45b2b4e620a14e3cc9c3b5939dd0cb1416d0 --- src/cli/lib/components.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/lib/components.ts b/src/cli/lib/components.ts index 6aa61d2..9608700 100644 --- a/src/cli/lib/components.ts +++ b/src/cli/lib/components.ts @@ -419,7 +419,7 @@ function printDiff( // Print out index diffs for the root component. let rootDiff = componentDiffs[""]; - if (rootDiff) { + if (rootDiff && rootDiff.indexDiff) { if (rootDiff.indexDiff.removed_indexes.length > 0) { let msg = `${opts.dryRun ? "Would delete" : "Deleted"} table indexes:\n`; for (let i = 0; i < rootDiff.indexDiff.removed_indexes.length; i++) {