Skip to content

[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

Open
wants to merge 1 commit into
base: wuandy/RealPpl_2
Choose a base branch
from

Conversation

wu-hui
Copy link
Contributor

@wu-hui wu-hui commented Apr 8, 2025

No description provided.

@wu-hui wu-hui requested review from a team as code owners April 8, 2025 22:08
Copy link

changeset-bot bot commented Apr 8, 2025

⚠️ No Changeset found

Latest commit: 5065573

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Apr 8, 2025

Vertex AI Mock Responses Check ⚠️

A newer major version of the mock responses for Vertex AI unit tests is available. update_vertexai_responses.sh should be updated to clone the latest version of the responses: v8.0

*/
export function _onRealtimePipelineSnapshot(
pipeline: RealtimePipeline,
options: SnapshotListenOptions,
Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor

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;
Copy link
Contributor

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
>(
Copy link
Contributor

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)
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reminder on this TODO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants