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

feat: add firestore bundles #319

Merged
merged 36 commits into from Mar 29, 2021
Merged

feat: add firestore bundles #319

merged 36 commits into from Mar 29, 2021

Conversation

craiglabenz
Copy link
Contributor

No description provided.

@craiglabenz craiglabenz self-assigned this Mar 2, 2021
@craiglabenz craiglabenz requested a review from a team March 2, 2021 18:41
@craiglabenz craiglabenz requested a review from a team as a code owner March 2, 2021 18:41
@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/python-firestore API. label Mar 2, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Mar 2, 2021
@craiglabenz craiglabenz changed the title feat: add firestore bundles [wip] feat: add firestore bundles Mar 9, 2021
@craiglabenz craiglabenz changed the title feat: add firestore bundles feat: add firestore bundles [wip] Mar 9, 2021
@craiglabenz craiglabenz requested review from crwilcox and removed request for crwilcox March 11, 2021 23:08
@craiglabenz craiglabenz added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 15, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 15, 2021
@craiglabenz craiglabenz changed the title feat: add firestore bundles [wip] feat: add firestore bundles Mar 16, 2021
google/cloud/firestore_bundle/bundle.py Outdated Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Outdated Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Show resolved Hide resolved
google/cloud/firestore_v1/_helpers.py Show resolved Hide resolved
Copy link

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

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

Some comments. Before merging, can you coordinate a test with wuandy@ to make sure that these Bundles load in our clients.

google/cloud/firestore_bundle/bundle.py Outdated Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Outdated Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Outdated Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Outdated Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Outdated Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Outdated Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Outdated Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Outdated Show resolved Hide resolved
tests/unit/v1/test_bundle.py Outdated Show resolved Hide resolved
Copy link

@wu-hui wu-hui left a comment

Choose a reason for hiding this comment

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

Thanks for incorporating the comments! I think we are close now.

I do want to discuss the possibility of accepting list of documents for addNamedQuery, please let me know what do you think.

google/cloud/firestore_bundle/bundle.py Outdated Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Show resolved Hide resolved
@craiglabenz
Copy link
Contributor Author

That's reasonable, @wu-hui. Adding now.

@craiglabenz
Copy link
Contributor Author

@wu-hui On second thought, accepting a list of DocumentSnapshot instances creates a new unsolved problem around how to reconstruct a proper NamedQuery object. I might vote that we defer that option for now.

@schmidt-sebastian
Copy link

@wu-hui Can we just treat queries and documents as independent? The Python SDK could offer APIs to add named queries and documents, but we don't necessarily need to associate the documents with the queries. The Mobile clients should still be able to handle this data (correct me if I am wrong).

I'm also very surprised that Python still does not have QuerySnapshots and a bit scared to find out what this means for the Watch API :)

@wu-hui
Copy link

wu-hui commented Mar 23, 2021

@wu-hui Can we just treat queries and documents as independent? The Python SDK could offer APIs to add named queries and documents, but we don't necessarily need to associate the documents with the queries. The Mobile clients should still be able to handle this data (correct me if I am wrong).

I'm also very surprised that Python still does not have QuerySnapshots and a bit scared to find out what this means for the Watch API :)

I think we might have to accept Query and run on behalf of user for Python, there is no other way to get StructuredQuery otherwise. WDYT?

Copy link

@wu-hui wu-hui left a comment

Choose a reason for hiding this comment

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

LGTM with some nits on comments

google/cloud/firestore_bundle/bundle.py Outdated Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Outdated Show resolved Hide resolved
google/cloud/firestore_bundle/bundle.py Outdated Show resolved Hide resolved
@wu-hui
Copy link

wu-hui commented Mar 29, 2021

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/python-firestore API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants