-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add remnant events migration plugin (#40)
* feat: add remnant events migration plugin * delete events after migration * fix lint errors and add test file * slight refactor and add unit tests * attempt to fix unit test failure * attempt to fix unit test failure * use testImplementation instead of core, remove extension of Storage interface * added getDeviceId()/getUserId() methods, added instance name support * fix lint warnings * fix plugin logic (database version, library format) * extend plugin logic (device/user id, identifies, intercepted identifies) * added support for db version 3 * added test for db version 3 * move migration logic to 'migration' package * added test for missing legacy db * move MigrationPlugin to Initializer * restore session data, do not clean device/user id, support first/next runs since upgrade * fix tests * add short delay after each test to complete asynchronous handlers - to remove errors like 'java.lang.RuntimeException: Method e in android.util.Log not mocked.' during test run * remove short delay after each test to complete asynchronous handlers - now in-memory IMIdentityStorageProvider is used * add try/catch for each migrated event * refactoring: added flag 'migrateLegacyData' instead of initializers * add test for migrateLegacyData=false * remove unnecessary permission READ_PHONE_STATE * move legacy 'uuid' field to 'insert_id' * make `build()` protected open for backward compatibility * write converted legacy event instead of json representation * fix some "simple" build warnings * make migrateLegacyData writable to set in Java code --------- Co-authored-by: Andrey Sokolov <andrey.sokolov@amplitude.com>
- Loading branch information
1 parent
652ea42
commit 6225f5d
Showing
25 changed files
with
995 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.