Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve logging for backups 🍒 (WPB-12113) #3608

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class BackupAndRestoreViewModel
restoreFileValidation = RestoreFileValidation.ValidNonEncryptedBackup,
backupRestoreProgress = BackupRestoreProgress.InProgress(PROGRESS_75)
)
when (importBackup(importedBackupPath, null)) {
when (val result = importBackup(importedBackupPath, null)) {
RestoreBackupResult.Success -> {
updateCreationProgress(PROGRESS_75)
delay(SMALL_DELAY)
Expand All @@ -221,10 +221,7 @@ class BackupAndRestoreViewModel
}

is RestoreBackupResult.Failure -> {
appLogger.e(
"Error when restoring the db file. The format or version of the backup is not compatible with this " +
"version of the app"
)
appLogger.e("Error when restoring the backup db file caused by: ${result.failure.cause}")
state = state.copy(
restoreFileValidation = RestoreFileValidation.IncompatibleBackup,
backupRestoreProgress = BackupRestoreProgress.Failed
Expand Down
2 changes: 1 addition & 1 deletion kalium
Submodule kalium updated 23 files
+3 −0 calling/consumer-proguard-rules.pro
+29 −16 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/conversation/ConversationRepository.kt
+1 −0 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/UserSessionScope.kt
+9 −3 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/backup/RestoreBackupUseCase.kt
+7 −1 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/backup/RestoreWebBackupUseCase.kt
+3 −0 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/conversation/ConversationScope.kt
+41 −0 ...in/kotlin/com/wire/kalium/logic/feature/conversation/ObserveConversationListDetailsWithEventsUseCaseImpl.kt
+2 −1 logic/src/commonTest/kotlin/com/wire/kalium/logic/data/conversation/ConversationMapperTest.kt
+84 −92 logic/src/commonTest/kotlin/com/wire/kalium/logic/data/conversation/ConversationRepositoryTest.kt
+147 −0 persistence/src/commonMain/db_user/com/wire/kalium/persistence/ConversationDetails.sq
+174 −0 persistence/src/commonMain/db_user/com/wire/kalium/persistence/ConversationDetailsWithEvents.sq
+3 −253 persistence/src/commonMain/db_user/com/wire/kalium/persistence/Conversations.sq
+9 −37 persistence/src/commonMain/db_user/com/wire/kalium/persistence/MessagePreview.sq
+215 −0 persistence/src/commonMain/db_user/migrations/88.sqm
+2 −2 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/conversation/ConversationDAO.kt
+13 −9 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/conversation/ConversationDAOImpl.kt
+14 −22 ...e/src/commonMain/kotlin/com/wire/kalium/persistence/dao/conversation/ConversationDetailsWithEventsMapper.kt
+39 −13 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/conversation/ConversationExtensions.kt
+2 −2 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/conversation/ConversationMapper.kt
+1 −1 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/member/MemberDAO.kt
+2 −0 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/db/UserDatabaseBuilder.kt
+2 −2 persistence/src/commonTest/kotlin/com/wire/kalium/persistence/conversation/ConversationExtensionsTest.kt
+5 −5 persistence/src/commonTest/kotlin/com/wire/kalium/persistence/dao/ConversationDAOTest.kt
Loading