WorkManager's Worker is created for periodically running storage maintenance operation on places database.
DB size limit is exposed from A-S that indicates the maximum DB size to aim for, in bytes. If the database
exceeds this size, a small number of visits will be pruned. This operation is done periodically by a periodic
work request that, optimally, will run once a day as long as the worker constraints are met.
Used `runTestOnMain` where `MainCoroutineRule` was used or needed to be used,
`runTest` elsewhere.
Extra effort for removing all `runBlocking` occurrences in unit tests.
`kotlinx.coroutines.test.runTest` is a test specific API that seems like a more
appropriate way for running tests in a coroutine than the general
`kotlinx.coroutines.runBlocking` api.
* app-services tabs component constructor now wants a database filename
* Incrment to 93.0.1
* Bumps a-s to 93.1.0
* No issue: Correct changelog entries
Co-authored-by: Mark Hammond <mhammond@skippinet.com.au>
Co-authored-by: James Hugman <james@hugman.tv>
Co-authored-by: Jonathan Almeida <jalmeida@mozilla.com>
* Revert "Incrment to 93.0.1"
This reverts commit 83403d4726846e8047963cf41460aa4a95a64278.
* Revert "app-services tabs component constructor now wants a database filename"
This reverts commit 6484b4b135dbf93cb6f3daea3b43076b984f8a51.
* fixup the VisitObservation, HistoryVisitInfo APIs based on changes in a-s
* Uniffi top frecent site info (https://github.com/mozilla-mobile/android-components/issues/3)
* uses VisitTransition in HistoryVisitInfo (https://github.com/mozilla-mobile/android-components/issues/4)
* fixup the VisitObservation, HistoryVisitInfo APIs based on changes in a-s
* updated based on bookmarks being uniffied
* fix issues with how we are rethrowing places exceptions
* bump appservices version
* fix ktlint lexiographic and ununsed import errors
* updated fennec migration code
Co-authored-by: Tarik Eshaq <tarikeshaq@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
In feature-session we had some logic to filter out certain URIs. This
patch moves this logic into the storage layer, so that it has a broader
coverage - whenever we attempt to write some URL into the storage, we'll
now go through this filter.
Before, we'd only go through this filter for writes that were routed via
the HistoryDelegate.
After this change, direct writes (such as for metadata) are also
covered.
This shouldn't change all that much - the storage implementation is
likely to have rejected these URIs. Now, instead of letting it through
exceptions at us (which we catch and report via sentry), we simply don't
even call into the storage if we don't expect these calls to succeed.
This should reduce volume of "url without base" type of 'info' events we
see in Sentry.
Most of the time redirectSource isn't set, so this makes that field
optional, and switches away from a special enum (NOT_A_SOURCE) to just a
simple nullable.
Not using a write scope means we could have concurrent writes, leading
to sqlite throwing "database locked" exceptions.
All other writers here use the writeScope.
* Add Places calls for recently added bookmarks.
Changelog addition for bookmarks places api additions.
* Test for fetching list of recently added bookmarks
* Reword kdoc and changelog