Fixes an issue in DataStore where it dropped consecutive updates to a model if
received while the network was not connected. As part of this fix, we
simplified the OutgoingMutationQueue state machine and cleaned up potential
race conditions in state synchronization between RemoteSyncEngine and
OutgoingMutationQueue.
- fix: Fix data races in MutationRetryNotifier encountered in some test
situations. It's unclear whether this would be encountered in production
since the production model includes additional queue protections.
- fix: Fix retain cycles in RemoteSyncEngine
- fix: RemoteSyncEngine now correctly sets up publisher notifications for
custom reachability publishers
- test: Change SyncEngineTestBase reachabilityPublisher to be
CurrentValueSubject
- test: DataStore sync tests can now specify an on-disk SQLite file rather than
only an in-memory SQLite database to back the DataStore.
- test: API category can now specify a custom reachability publisher
- test: fix Amplify.reset(). This includes explicitly declaring Resettable
conformance for a few types that were missing it, protecting `Logger` with an
AtomicValue since it is used during the actual reset() flow, and adding
verbose logging to reset flows to help identify race conditions or deadlocks
in future. Amplify.reset() is also now synchronous, although Resettable.reset()
still accepts a callback.
- test: Overall DataStore test stability fixes