From 1207f5a643dea933263934337abb61768a9cfd9c Mon Sep 17 00:00:00 2001 From: Elizabeth Paige Harper Date: Fri, 12 Apr 2024 10:06:36 -0400 Subject: [PATCH] ref #248 --- .../vdi/lane/reconciliation/DatasetReconciler.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lanes/reconciliation/src/main/kotlin/vdi/lane/reconciliation/DatasetReconciler.kt b/lanes/reconciliation/src/main/kotlin/vdi/lane/reconciliation/DatasetReconciler.kt index be83abdb..94fc7abe 100644 --- a/lanes/reconciliation/src/main/kotlin/vdi/lane/reconciliation/DatasetReconciler.kt +++ b/lanes/reconciliation/src/main/kotlin/vdi/lane/reconciliation/DatasetReconciler.kt @@ -358,9 +358,19 @@ internal class DatasetReconciler( private fun AppDBAccessor.isUninstalled(): Boolean { val targetRecord = selectAppDatasetRecord() + // If the target record does not exist, then either VDI has been configured + // to point at a clean database, the target database has been wiped, or + // something has gone terribly wrong. We'll assume it was intentional here + // though and consider the dataset to be already uninstalled. if (targetRecord == null) { - logWarning("attempted to check install status for dataset {}/{} in project {} but no such dataset record could be found", userID, datasetID, project) - return false + logWarning( + "attempted to check install status for dataset {}/{} in project {} but no such dataset record could be found;" + + " assuming clean database and treating dataset as if it has been successfully uninstalled", + userID, + datasetID, + project + ) + return true } if (targetRecord.isDeleted != DeleteFlag.DeletedAndUninstalled) {