dataconnect(chore): wire up RealtimeQuerySubscriptionImpl to basic realtime subscription functionality#8144
Conversation
…sDataConnectGrpcStreamingServer.kt and TurbineUtils.kt This enables these classes to be used from both `androidTest` to `test` (thanks to the `@SharedWithAndroidTest` annotation and the associated gradle plugin) instead of just in `androidTest`. A future test will make use of this.
… streaming connection with the backend for realtime queries.
…le(): T` (moved from ConnectRPCIntegrationTest.kt)
…ic tests for DataConnectGrpcRPCs.connect()
…ared errors with itself instead of with the expected list [skip actions]
…sts if ConnectorStreamServiceCoroutineStub.connect() throws an exception
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces the experimental "realtime query subscription updates" feature to the Firebase Data Connect SDK. Key additions include the ExperimentalRealtimeQueries annotation, a realtimeQuery method in the internal interface and implementation, and the RealtimeQueryRefImpl and RealtimeQuerySubscriptionImpl classes to manage bidirectional streaming via DataConnectGrpcClient. Integration tests were also added to verify the properties and data of emitted results. Feedback from the review suggests improving coroutine cancellation handling by explicitly rethrowing CancellationException, updating documentation comments for accuracy regarding excluded characters in request IDs, and adding tracking bug references to TODO markers.
…aConnectSerialization' into RealtimeRewire2
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
This PR wires up
RealtimeQuerySubscriptionImplto basic realtime subscription functionality in the Data Connect SDK, enabling experimental support for realtime query updates.Highlights
ExperimentalRealtimeQueriesannotation to mark the new experimental feature.RealtimeQueryRefImplandRealtimeQuerySubscriptionImplto handle realtime query subscriptions.connectmethod toDataConnectGrpcClientto handle the bidirectional streaming connection for realtime updates.RealtimeQueryRefIntegrationTestto verify the behavior of emitted results.Changelog
File changes
DataConnectGrpcRPCsConnectIntegrationTest.kt: Opted in toExperimentalRealtimeQueries.RealtimeQueryRefIntegrationTest.kt: Added integration tests forrealtimeQuery.FirebaseDataConnectInternalExts.kt: AddedrealtimeQueryextension helper.RealtimeConnector.kt: AddedgetInstanceandDataconstructor.ExperimentalRealtimeQueries.kt: Created annotation for experimental realtime queries.DataConnectBidiConnectStream.kt: Updated stream handling and added annotation.DataConnectGrpcClient.kt: Addedconnectmethod for streaming responses.DataConnectGrpcRPCs.kt: Added annotation toconnect.FirebaseDataConnectImpl.kt: ImplementedrealtimeQuerymethod.RealtimeQueryRefImpl.kt: Created temporary implementation for realtimeQueryRef.RealtimeQuerySubscriptionImpl.kt: Created temporary implementation for realtimeQuerySubscription.DataConnectGrpcRPCsUnitTest.kt: Opted in toExperimentalRealtimeQueries.