fix(firestore): ensure limit(0) is properly serialized in query requests#8076
fix(firestore): ensure limit(0) is properly serialized in query requests#8076dlarocque merged 2 commits intogoogleapis:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the Firestore query logic to correctly handle a limit of 0 by replacing falsy checks with explicit undefined checks, and adds a corresponding test case. Feedback suggests using nullish equality checks (== null and != null) instead of strict undefined checks to preserve existing behavior for null values and follow the Google TypeScript Style Guide.
|
Hi @liu-husong thanks for the contribution! This looks good to me- I'll just let the workflows run and then I'll approve this PR. |
Thanks @dlarocque! Quick check — are the workflows manually triggered? If so, did you trigger them already? I’m asking because the status hasn’t updated in a while, and I’m wondering if they’ll progress without intervention. Also a quick noob question: after you approve the PR, should I go ahead and click “merge,” or is that typically left to maintainers? First time contributing here, so want to make sure I follow the right process. |
I thought they'd go off manually once I approved the workflows, but it seems I had to manually trigger them using a label. They should run to completion now.
Once CI passes, I'll approve the PR, then you can click "merge". Unless you find that you don't have permissions to do that, in which case I can merge it for you. |
Previously, calling .limit(0) on a Firestore Query did not serialize the zero value to the wire protocol, causing queries to be sent without a limit constraint. This change explicitly includes limit(0) in the query proto. Fixes googleapis#7382
|
@dlarocque Hi — I think all checks have passed, but I’m not seeing the “Merge” button (likely due to permissions). I tried rebasing to see if that would help, but it put the PR back into pending CI. Could you help apply the label to trigger CI and assist with merging? Thanks! |
Sorry about the painful process here. If the workflows pass again and you're still unable to merge, ping me and I'll merge it for you. |
…sts (googleapis#8076) Previously, calling .limit(0) on a Firestore Query did not serialize the zero value to the wire protocol, causing queries to be sent without a limit constraint. This change explicitly includes limit(0) in the query proto. Fixes googleapis#7382
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #7382 🦕