fix(firestore): Read user data from pipeline in union stage#9765
fix(firestore): Read user data from pipeline in union stage#9765
Conversation
Fixes #9764. This bug was introduced in 4e99d4b. User data has been deferred from stage initialization to pipeline execution. User data in pipelines passed to a `union()` stage was not being read. This fix explicitly checks if a union stage was passed a Pipeline, and calls it's `readUserData` method with the outer pipeline context.
🦋 Changeset detectedLatest commit: 3f5702d The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical bug in Firestore's pipeline functionality, specifically concerning the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses GitHub Issue #9764 by modifying the Union stage in the Firestore pipeline to ensure user data is read from both the primary and 'other' pipeline segments. This change is implemented in _readUserData by conditionally calling this.other._readUserData(context). New integration and lite tests have been added to validate this functionality, specifically for pipelines using union and sort operations. A review comment points out a potential inconsistency in the expected results of the new integration test, suggesting that the sorting order for document IDs might be incorrect, specifically regarding the placement of 'book10' relative to 'book1'.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request fixes GitHub Issue #9764 by ensuring user data is read from the pipeline in the Firestore union stage. It updates the Union class to correctly invoke _readUserData on the associated stage and adds corresponding integration and lite tests. Review feedback suggests programmatically generating expected document IDs in the new tests to enhance maintainability and readability.
Fixes #9764.
This bug was introduced in 4e99d4b.
Reading user data in a pipeline has been deferred from stage initialization to when
execute(pipeline)is called. An inner pipeline in a union stage never had it's user data read after this change.This fix calls
readUserDataon the pipeline passed to the union stage whenreadUserDatais called on the outer pipeline.