application-services/CHANGELOG.md

22 KiB

Unreleased Changes

See the release process docs for the steps to take when cutting a new release.

Full Changelog

v0.20.1 (2019-03-15)

Full Changelog

  • A error in the build.gradle file caused the v0.20.0 release to fail, this release should not be meaningfully different from it.

v0.20.0 (2019-03-14)

Full Changelog

General

  • The previous release had an issue with the megazords, and so another release was needed. This is version 0.4.2 of the megazord plugin. (#775)

Breaking Changes

  • All package names have been normalized. The gradle packages should all be org.mozilla.appservices:component, and the java namespaces should be mozilla.appservices.component. (#776)

Logins

Breaking Changes

  • The gradle package for logins has been changed from 'org.mozilla.sync15:logins' to org.mozilla.appservices:logins. (#776)

Places

Breaking Changes

  • Several classes and interfaces have been renamed after feedback from consumers to avoid Interface in the name, and better reflect what they provide.

    • PlacesApiInterface => PlacesManager
    • PlacesConnectionInterface => InterruptibleConnection
    • ReadablePlacesConnectionInterface => ReadableHistoryConnection
    • WritablePlacesConnectionInterface => WritableHistoryConnection
    • ReadablePlacesConnection => PlacesReaderConnection
    • WritablePlacesConnection => PlacesWriterConnection
  • The java namespace used in places has changed from org.mozilla.places to mozilla.appservices.places (#776)

  • The gradle package for places has been changed from 'org.mozilla.places:places' to org.mozilla.appservices:places. (#776)

FxA

Breaking Changes

  • The gradle package for fxa-client has been changed from 'org.mozilla.fxaclient:fxaclient' to org.mozilla.appservices:fxaclient. (#776)

0.19.0 (2019-03-13)

Full Changelog

General

What's New

  • Initial support for the new Push component landed, however it's not yet ready for widespread use (#683)

Places

What's New

  • A massive rewrite of the Kotlin API has been completed. This distinguishes reader and writer connections. A brief description of the new types follows. Note that all the types have corresponding interfaces that allow for them to be mocked during testing as needed. (#718)
    • PlacesApi: This is similar to a connection pool, it exists to give out reader and writer connections via the functions openReader and getWriter. The naming distinction is due to there only being a single writer connection (which is actually opened when the PlacesApi is created). This class generally should be a singleton.
      • In addition to openReader and getWriter, this also includes the sync() method, as that requires a special type of connection.
    • ReadablePlacesConnection: This is a read-only connection to the places database, implements all the methods of the API that do not require write access.
      • Specifically, getVisited, matchUrl, queryAutocomplete, interrupt, getVisitedUrlsInRange, and getVisitInfos all exist on this object.
    • WritablePlacesConnection: This is a read-write connection, and as such, contains not only the all reader methods mentioned above, but also the methods requiring write access, such as:
      • noteObservation, wipeLocal, runMaintenance, pruneDestructively, deleteEverything, deletePlace, deleteVisitsSince, deleteVisitsBetween, and deleteVisit.
    • Note that the semantics of the various methods have not been changed, only their location.

Breaking Changes

  • Almost the entire API has been rewritten. See "What's New" for details. (#718)

0.18.0 (2019-02-27)

Full Changelog

FxA

Breaking Changes

  • Swift: FxAError has been renamed to FirefoxAccountError (#713)

Places

What's Fixed

  • Autocomplete should no longer return an error when encountering certain emoji (#691)

Logging

What's New

  • The rc_log component now has support for iOS. It is only available as part of the MozillaAppServices megazord. (#618)

0.17.0 (2019-02-19)

Full Changelog

FxA

What's New

  • We are now using Protocol Buffers to pass the Profile data across the FFI boundaries, both on Android and iOS. On Android there should be no breaking changes.
  • Kotlin: Profile is now a Data Class.

Breaking changes

  • iOS: You now have to include the SwiftProtobuf framework in your projects for FxAClient to work (otherwise you'll get a runtime error when fetching the user profile). It is built into Carthage/Build/iOS just like FxAClient.framework.
  • iOS: In order to build FxAClient from source, you need swift-protobuf installed. Simply run brew install swift-protobuf if you have Homebrew.
  • iOS: You need to run carthage bootstrap at the root of the repository at least once before building the FxAClient project: this will build the SwiftProtobuf.framework file needed by the project.
  • iOS: the Profile class now inherits from RustProtobuf. Nothing should change in practice for you.

Places

What's New

  • New methods on PlacesConnection (Breaking changes for classes implementing PlacesAPI):
    • fun deleteVisit(url: String, timestamp: Long): If a visit exists at the specified timestamp for the specified URL, delete it. This change will be synced if it is the last remaining visit (standard caveat for partial visit deletion). (#621)

    • fun deleteVisitsBetween(start: Long, end: Long): Similar to deleteVisitsSince(start), but takes an end date. (#621)

    • fun getVisitInfos(start: Long, end: Long = Long.MAX_VALUE): List<VisitInfo>: Returns a more detailed set of information about the visits that occured. (#619)

      • VisitInfo is a new data class that contains a visit's url, title, timestamp, and type.
    • fun wipeLocal(): Deletes all history entries without recording any sync information. (#611).

      This means that these visits are likely to start slowly trickling back in over time, and many of them will come back entirely if a full sync is performed (which may not happen for some time, admittedly). The intention here is that this is a method that's used if data should be discarded when disconnecting sync, assuming that it would be desirable for the data to show up again if sync is reconnected.

      For more permanent local deletions, see deleteEverything, also added in this version.

    • fun runMaintenance(): Perform automatic maintenance. (#611)

      This should be called at least once per day, however that is a recommendation and not a requirement, and nothing dire happens if it is not called.

      The maintenance it may perform potentially includes, but is not limited to:

      • Running VACUUM.
      • Requesting that SQLite optimize our indices.
      • Expiring old visits.
      • Deleting or fixing corrupt or invalid rows.
      • Etc.

      However not all of these are currently implemented.

    • fun pruneDestructively(): Aggressively prune history visits. (#611)

      These deletions are not intended to be synced, however due to the way history sync works, this can still cause data loss.

      As a result, this should only be called if a low disk space notification is received from the OS, and things like the network cache have already been cleared.

    • fun deleteEverything(): Delete all history visits. (#647)

      For sync users, this will not cause the visits to disappear from the users remote devices, however it will prevent them from ever showing up again, even across full syncs, or sync sign-in and sign-out.

      See also wipeLocal, also added in this version, which is less permanent with respect to sync data (a full sync is likely to bring most of it back).

Breaking Changes

  • The new PlacesConnection methods listed in the "What's New" all need to be implemented (or stubbed) by any class that implements PlacesAPI. (multiple bugs, see "What's New" for specifics).

What's fixed

  • Locally deleted visits deleted using deleteVisitsSince should not be resurrected on future syncs. (#621)
  • Places now properly updates frecency for origins, and generally supports origins in a way more in line with how they're implemented on desktop. (#429)

0.16.1 (2019-02-08)

Full Changelog

Logins

What's Fixed

  • iOS LoginRecords will no longer use empty strings for httpRealm and formSubmitUrl in cases where they claim to use nil. (#623)
    • More broadly, all optional strings in LoginRecords were were being represented as empty strings (instead of nil) unintentionally. This is fixed.
  • iOS: Errors that were being accidentally swallowed should now be properly reported. (#640)
  • Schema initialization/upgrade now happen in a transaction. This should avoid corruption if some unexpected error occurs during the first unlock() call. (#642)

Breaking changes

  • iOS: Code that expects empty strings (and not nil) for optional strings should be updated to check for nil instead. (#623)
    • Note that this went out in a non-major release, as it doesn't cause compilation failure, and manually reading all our dependents determined that nobody was relying on this behavior.

FxA

What's Fixed

  • iOS: Some errors that were being accidentally swallowed should now be properly reported. (#640)

0.16.0 (2019-02-06)

Full Changelog

General

What's New

  • iOS builds now target v11.0. (#614)
  • Preparatory infrastructure for megazording iOS builds has landed.(#625)

Places

Breaking Changes

  • Several new methods on PlacesConnection (Breaking changes for classes implementing PlacesAPI):
    • fun interrupt(). Cancels any calls to queryAutocomplete or matchUrl that are running on other threads. Those threads will throw an OperationInterrupted exception. (#597)
      • Note: Using interrupt() during the execution of other methods may work, but will have mixed results (it will work if we're currently executing a SQL query, and not if we're running rust code). This limitation may be lifted in the future.
    • fun deletePlace(url: String): Deletes all visits associated with the provided URL (#591)
      • Note that these deletions are synced!
    • fun deleteVisitsSince(since: Long): Deletes all visits between the given unix timestamp (in milliseconds) and the present (#591).
      • Note that these deletions are synced!

What's New

  • Initial support for storing bookmarks has been added, but is not yet exposed over the FFI. (#525)

FxA

What's Fixed

  • iOS Framework: Members of Avatar struct are now public. (#615)

0.15.0 (2019-02-01)

Full Changelog

General

What's New

  • A new megazord was added, named fenix-megazord. It contains the components for FxA and Places (and logging). (#585)
    • Note: To use this, you must be on version 0.3.1 of the gradle plugin.

Logins

What's Fixed

  • Fix an issue where unexpected errors would become panics. (#593)
  • Fix an issue where syncing with invalid credentials would be reported as the wrong kind of error (and cause a panic because of the previous issue). (#593)

Places

What's New

  • New method on PlacesConnection (breaking change for classes implementing PlacesAPI): fun matchUrl(query: String): String?. This is similar to queryAutocomplete, but only searches for URL and Origin matches, and only returns (a portion of) the matching url (if found), or null (if not). (#595)

What's Fixed

  • Autocomplete will no longer return an error when asked to match a unicode string. (#298)

  • Autocomplete is now much faster for non-matching queries and queries that look like URLs. (#589)

FxA

What's New

  • It is now possible to know whether a profile avatar has been set by the user. (#579)

Breaking Changes

  • The avatar accessor from the Profile class in the Swift framework now returns an optional Avatar struct instead of a String. (#579)

0.14.0 (2019-01-23)

Full Changelog

General

What's New

  • A new component was added for customizing how our Rust logging is handled. It allows Android code to get a callback whenever a log is emitted from Rust (Most users will not need to use this directly, but instead will consume it via the forthcoming helper that hooks it directly into android-components Log system in android-components PR #1765). (#472)

  • The gradle megazord plugin updated to version 0.3.0, in support of the logging library. Please update when you update your version of android-components. (#472)

  • In most cases, opaque integer handles are now used to pass data over the FFI (#567). This should be more robust, and allow detection of many types of errors that would previously cause silent memory corruption.

    This should be mostly transparent, but is a semi-breaking semantic change in the case that something throws an exception indicating that the Rust code paniced (which should only occur due to bugs anyway). If this occurs, all subsequent operations on that object (except close/lock) will cause errors. It is "poisoned", in Rust terminology. (In the future, this may be handled automatically)

    This may seem inconvenient, but it should be an improvement over the previous version, where we instead would simply carry on despite potentially having corrupted internal state.

  • Build settings were changed to reduce binary size of Android .so by around 200kB (per library). (#567)

  • Rust was updated to 1.32.0, which means we no longer use jemalloc as our allocator. This should reduce binary size some, but at the cost of some performance. (No bug as this happens automatically as part of CI, see the rust-lang release notes for more details).

Breaking Changes

  • Megazord builds will no longer log anything by default. Logging must be enabled as described "What's New". (#472)

Places

What's Fixed

  • PlacesConnection.getVisited will now return that invalid URLs have not been visited, instead of throwing. (#552)
  • PlacesConnection.noteObservation will correctly identify url parse failures as such. (#571)
  • PlacesConnections not utilizing encryption will not make calls to mlock/munlock on every allocation/free. This improves performance up to 6x on some machines. (#563)
  • PlacesConnections now use WAL mode. (#555)

FxA

Breaking Changes

Some APIs which are semantically internal (but exposed for various reasons) have changed.

  • Android: Some protected methods on org.mozilla.fxaclient.internal.RustObject have been changed (destroy now takes a Long, as it is an opaque integer handle). This object should not be considered part of the public API of FxA, but it is still available. Users using it are recommended not to do so. (#567)
  • iOS: The type RustOpaquePointer was replaced by RustHandle, which is a RustPointer<UInt64>. While these are technically part of the public API, they may be removed in the future and users are discouraged from using them. (#567)

0.13.3 (2019-01-11)

Full Changelog

Places

What's Fixed

  • Places will no longer log PII. (#540)

0.13.2 (2019-01-11)

Full Changelog

Firefox Accounts

What's New

  • The fxa-client android library will now write logs to logcat. (#533)
  • The fxa-client Android and iOS librairies will throw a differentiated exception for general network errors. (#535)

0.13.1 (2019-01-10)

Full Changelog

Note: This is a patch release that works around a bug introduced by a dependency. No functionality has been changed.

General

What's New

N/A

What's Fixed

  • Network requests on Android. Due to a bug in reqwest, it's version has been pinned until we can resolve this issue. (#530)

0.13.0 (2019-01-09)

Full Changelog

General

What's New

  • Upgraded openssl to 1.1.1a (#474)

What's Fixed

  • Fixed issue where backtraces were still enabled, causing crashes on some android devices (#509)
  • Fixed some panics that may occur in corrupt databases or unexpected data. (#488)

Places

What's New

N/A

What's fixed

  • Autocomplete no longer returns more results than requested (#489)

Logins

Deprecated or Breaking Changes

  • Deprecated the reset method, which does not perform any useful action (it clears sync metadata, such as last sync timestamps and the mirror table). Instead, use the new wipeLocal method, or delete the database file. (#497)

What's New

  • Added the wipeLocal method for deleting all local state while leaving remote state untouched. (#497)
  • Added ensureLocked / ensureUnlocked methods which are identical to lock/unlock, except that they do not throw if the state change would be a no-op (e.g. they do not require that you check isLocked first). (#495)
  • Added an overload to unlock and ensureUnlocked that takes the key as a ByteArray. Note that this is identical to hex-encoding (with lower-case hex characters) the byte array prior to providing it to the string overload. (#499)

What's Fixed

  • Clarified which exceptions are thrown in documentation in cases where it was unclear. (#495)
  • Added @Throws annotations to all methods which can throw. (#495)