-
Notifications
You must be signed in to change notification settings - Fork 578
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
dataconnect: some small new APIs and major testing refactor #6424
dataconnect: some small new APIs and major testing refactor #6424
Conversation
Release note changesThe following release notes were modified. Please ensure they look correct. Release Notesfirebase-dataconnect### {{data_connect_short}} version 16.0.0-beta03 {: #data-connect_v16-0-0-beta03}
* {{changed}} Requires Data Connect emulator version 1.6.1 or later for code generation.
* {{feature}} QueryRef and MutationRef gain methods copy(), withDataDeserializer(),
and withVariablesSerializer().
(GitHub [#6424](//github.com/firebase/firebase-android-sdk/issues/6424){: .external})
* {{feature}} GeneratedConnector gains methods copy(), operations(), queries(),
and mutations().
(GitHub [#6424](//github.com/firebase/firebase-android-sdk/issues/6424){: .external})
* {{feature}} GeneratedQuery and GeneratedMutation gain methods copy(),
withVariablesSerializer(), and withDataDeserializer().
(GitHub [#6424](//github.com/firebase/firebase-android-sdk/issues/6424){: .external})
* {{feature}} GeneratedConnector, GeneratedQuery, and GeneratedMutation now
must implement equals() to be a _logical_ comparsion, rather than just
checking for _referencial_ equality using the `===` operator.
(GitHub [#6424](//github.com/firebase/firebase-android-sdk/issues/6424){: .external})
* {{feature}} FirebaseDataConnectExperimental annotation added, and some
APIs have been annotated with it, requiring applications that make use of
these experimental APIs to opt-in using
`@OptIn(FirebaseDataConnectExperimental::class)` to suppress warnings or
errors related to using these experimental APIs.
(GitHub [#6424](//github.com/firebase/firebase-android-sdk/issues/6424){: .external})
|
Vertex AI Mock Responses Check
|
The public api surface has changed for the subproject firebase-dataconnect: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
1 similar comment
The public api surface has changed for the subproject firebase-dataconnect: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
Test Results 54 files + 34 54 suites +34 1m 57s ⏱️ + 1m 42s Results for commit 49264ac. ± Comparison against base commit b9013d5. This pull request removes 113 and adds 515 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
…dataconnect:generateApiTxtFile
The public api surface has changed for the subproject firebase-dataconnect: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
…dataconnect:generateApiTxtFile
This PR is a large refactor of the Firebase Data Connect unit and integration tests. This refactor started with the goal of replacing "Truth" (https://github.com/google/truth) with the more Kotlin-idiomatic "kotest" assertion library. Also, many tests were updated to use kotest "property-based testing" (https://kotest.io/docs/proptest/property-based-testing.html) to improve test coverage.
During the test refactor, some advanced public APIs were noticed to absent, and were added as part of this PR. These include:
OperationRef
,QueryRef
, andMutationRef
gain methodscopy()
,withVariablesSerializer()
, andwithDataDeserializer()
GeneratedConnector
gains methodscopy()
,operations()
,queries()
, andmutations()
.GeneratedOperation
,GeneratedQuery
, andGeneratedMutation
gain methodscopy()
,withVariablesSerializer()
, andwithDataDeserializer()
GeneratedConnector
,GeneratedOperation
,GeneratedQuery
, andGeneratedMutation
change the semantics ofequals()
andhashCode()
to be based on logical equality rather than referential equality; that is, the property values and runtime type are used to determine equality rather than simply using the===
operator.These changes are breaking and are incompatible with the Firebase Data Connect emulator code generation prior to v1.6.0. Using an older version of the Firebase Data Connect emulator code generation will results in Kotlin compiler errors like this:
If you experience compiler error like these, please either downgrade to Firebase Data Connect emulator code generation prior to version
1.6.0
or upgrade your Firebase Data Connect Android SDK to version16.0.0-beta03
or later.`