-
Notifications
You must be signed in to change notification settings - Fork 924
[3/4] Integrate realtime ppl into SDK cache management and tests #8910
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
base: wuandy/RealPpl_2
Are you sure you want to change the base?
Conversation
|
Vertex AI Mock Responses Check
|
6710057
to
0c570ab
Compare
33caa24
to
5065573
Compare
*/ | ||
export function _onRealtimePipelineSnapshot( | ||
pipeline: RealtimePipeline, | ||
options: SnapshotListenOptions, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our design doc was updated to use PipelineListenOptions, which will add serverTimestamps
config and remove source
. Though, if we want to support source, we can. go/firestore-api-realtime-pipelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be refactored in a future PR, as long as we track it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More generally, we will need to put together a design for how pipeline options are passed to onSnapshot.
@@ -691,7 +703,7 @@ export function onSnapshot<AppModelType, DbModelType extends DocumentData>( | |||
|
|||
let observer: PartialObserver<ViewSnapshot>; | |||
let firestore: Firestore; | |||
let internalQuery: InternalQuery; | |||
let internalQuery: QueryOrPipeline; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type can be reverted back, since we have separated the implementations of listeners for pipelines and query
export function onPipelineSnapshot< | ||
AppModelType, | ||
DbModelType extends DocumentData | ||
>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to drop generics from this new api
return this.retrieveMatchingLocalDocuments( | ||
overlays, | ||
remoteDocuments, | ||
doc => pipelineMatches(pipeline, doc as MutableDocument) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't clear to me, but do we remove offsets and limits from the pipeline
argument? If not, could those cause false negatives?
queryCollectionGroup(query), | ||
documents | ||
); | ||
// TODO(pipeline): this needs to be adapted to support pipelines as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reminder on this TODO
No description provided.