Skip to content
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

Add option to get named firestore instance for v2 firestore functions #1550

Merged
merged 2 commits into from Apr 12, 2024

Conversation

colerogers
Copy link
Contributor

Copy link
Contributor

@blidd-google blidd-google left a comment

Choose a reason for hiding this comment

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

LGTM besides minor nit

if (!firestoreInstance) {
firestoreInstance = firestore.getFirestore(getApp());
firestoreInstance = firestore.getFirestore(databaseId);
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious, why aren't you conditioning on firestoreInstance here like in createBeforeSnapshotFromBeforeProtobuf?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean conditioning on databaseId right?

Because these two *fromProtobuf functions are only called from the V2 handler and V2 events always supply the databaseId

@colerogers colerogers merged commit 6beaaeb into master Apr 12, 2024
13 checks passed
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.

[functions]: v2 change events and creation shapshots not referencing named database it was triggered on
2 participants