Conversation
Codecov Report
@@ Coverage Diff @@
## master #466 +/- ##
============================================
- Coverage 73.40% 73.35% -0.06%
+ Complexity 1095 1086 -9
============================================
Files 65 65
Lines 5786 5790 +4
Branches 721 723 +2
============================================
Hits 4247 4247
- Misses 1313 1317 +4
Partials 226 226
Continue to review full report at Codecov.
|
|
|
||
| /** | ||
| * Returns a FirestoreBundle.Builder {@link FirestoreBundle.Builder} instance for the given bundle | ||
| * Id. |
| * Id. | ||
| * | ||
| * @param bundleId If null, an random string will be used for the Id. The Id is used by the client | ||
| * SDKs loading bundles to identify if a bundle has been loaded before. |
There was a problem hiding this comment.
s/Id/ID and swap both sentences.
If a null bundle ID is how me mainly expect the bundles to be used, should we add an overload that doesn't require an explicit null?
There was a problem hiding this comment.
Yep, that is better.
I also realized we provided no way for the client to get the bundle id if it is auto-id, they probably want to use it to manage their bundle serving. I added a getId to builder. Will pass a note to the council again.
There was a problem hiding this comment.
Thought on adding bundleBuilder() with no arguments? I believe this would be the main way to interact with bundles, and we should make it as easy as possible.
|
New methods on the Firestore interface will need ignore rules added to |
wu-hui
left a comment
There was a problem hiding this comment.
Also add to clirr ignore file.
|
|
||
| /** | ||
| * Returns a FirestoreBundle.Builder {@link FirestoreBundle.Builder} instance for the given bundle | ||
| * Id. |
| * Id. | ||
| * | ||
| * @param bundleId If null, an random string will be used for the Id. The Id is used by the client | ||
| * SDKs loading bundles to identify if a bundle has been loaded before. |
There was a problem hiding this comment.
Yep, that is better.
I also realized we provided no way for the client to get the bundle id if it is auto-id, they probably want to use it to manage their bundle serving. I added a getId to builder. Will pass a note to the council again.
google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreBundle.java
Outdated
Show resolved
Hide resolved
…e/FirestoreBundle.java Co-authored-by: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com>
| * ID. | ||
| * | ||
| * @param bundleId The ID is used by the client SDKs loading bundles to identify if a bundle has | ||
| * been loaded before. If null, an random string will be used for the ID. |
| * Id. | ||
| * | ||
| * @param bundleId If null, an random string will be used for the Id. The Id is used by the client | ||
| * SDKs loading bundles to identify if a bundle has been loaded before. |
There was a problem hiding this comment.
Thought on adding bundleBuilder() with no arguments? I believe this would be the main way to interact with bundles, and we should make it as easy as possible.
|
@wu-hui What are your thoughts on the overload that doesn't take a bundle ID? |
Sorry I meant to reply your earlier comment. I think it is added (https://github.com/googleapis/java-firestore/pull/466/files#diff-b9277c291d91b6930b9a93135a3090afa8aebdacc3c728dec58f858db2bc7b95R177), were you looking at an older commit? |
schmidt-sebastian
left a comment
There was a problem hiding this comment.
LGTM. Sorry I must have looked at a different commit.
| * been loaded before. If null, a random string will be used for the ID. | ||
| */ | ||
| @Nonnull | ||
| FirestoreBundle.Builder bundleBuilder(@Nullable String bundleId); |
There was a problem hiding this comment.
s/@Nullable/@NotNull
markarndt
left a comment
There was a problem hiding this comment.
@wu-hui .
I think the Node version has a clearer definition of bundleID: "The id of the bundle. When loaded on clients, client SDKs use this id and the timestamp associated with the built bundle to tell if it has been loaded already. If not specified, a random identifier will be used."
| } | ||
|
|
||
| /** | ||
| * Adds a Firestore document snapshot to the bundle. Both the documents data and the document |
There was a problem hiding this comment.
Remove plural "Both the document data and...."
|
|
||
| /** | ||
| * Adds a Firestore document snapshot to the bundle. Both the documents data and the document | ||
| * read time will be included in the bundle. |
There was a problem hiding this comment.
Line 124-129 below, for add() doc, remove plural so "Adds a Firestore query snapshot to..."
wu-hui
left a comment
There was a problem hiding this comment.
Thanks Mark, I updated the comment for bundle ID.
| } | ||
|
|
||
| /** | ||
| * Adds a Firestore document snapshot to the bundle. Both the documents data and the document |
|
|
||
| /** | ||
| * Adds a Firestore document snapshot to the bundle. Both the documents data and the document | ||
| * read time will be included in the bundle. |
🤖 I have created a release \*beep\* \*boop\* --- ## [2.2.0](https://www.github.com/googleapis/java-firestore/compare/v2.1.0...v2.2.0) (2021-01-20) ### Features * Add bundle proto building ([#271](https://www.github.com/googleapis/java-firestore/issues/271)) ([994835c](https://www.github.com/googleapis/java-firestore/commit/994835c0a3be077404afa60abd4d4685d17fb533)) * add bundle.proto from googleapis/googleapis ([#407](https://www.github.com/googleapis/java-firestore/issues/407)) ([37da386](https://www.github.com/googleapis/java-firestore/commit/37da386875d1b65121e8a9a92b1a000537f07625)) * add CollectionGroup#getPartitions(long) ([#478](https://www.github.com/googleapis/java-firestore/issues/478)) ([bab064e](https://www.github.com/googleapis/java-firestore/commit/bab064edde26325bf0041ffe28d4c63b97a089c5)) * add implicit ordering for startAt(DocumentReference) calls ([#417](https://www.github.com/googleapis/java-firestore/issues/417)) ([aae6dc9](https://www.github.com/googleapis/java-firestore/commit/aae6dc960f7c42830ceed23c65acaad3e457dcff)) * add max/min throttling options to BulkWriterOptions ([#400](https://www.github.com/googleapis/java-firestore/issues/400)) ([27a9397](https://www.github.com/googleapis/java-firestore/commit/27a9397f67e151d723241c80ccb2ec9f1bfbba1c)) * add success and error callbacks to BulkWriter ([#483](https://www.github.com/googleapis/java-firestore/issues/483)) ([3c05037](https://www.github.com/googleapis/java-firestore/commit/3c05037e8fce8d3ce4907fde85bd254fc98ea588)) * Implementation of Firestore Bundle Builder ([#293](https://www.github.com/googleapis/java-firestore/issues/293)) ([fd5ef90](https://www.github.com/googleapis/java-firestore/commit/fd5ef90b6681cc67aeee6c95f3de80267798dcd0)) * Release bundles ([#466](https://www.github.com/googleapis/java-firestore/issues/466)) ([3af065e](https://www.github.com/googleapis/java-firestore/commit/3af065e32b193931c805b576f410ad90124b43a7)) ### Bug Fixes * add @BetaApi, make BulkWriter public, and refactor Executor ([#497](https://www.github.com/googleapis/java-firestore/issues/497)) ([27ff9f6](https://www.github.com/googleapis/java-firestore/commit/27ff9f6dfa92cac9119d2014c24a0759baa44fb7)) * **build:** sample checkstyle violations ([#457](https://www.github.com/googleapis/java-firestore/issues/457)) ([777ecab](https://www.github.com/googleapis/java-firestore/commit/777ecabd1ce12cbc5f4169de6c23a90f98deac06)) * bulkWriter: writing to the same doc doesn't create a new batch ([#394](https://www.github.com/googleapis/java-firestore/issues/394)) ([259ece8](https://www.github.com/googleapis/java-firestore/commit/259ece8511db71ea79cc1a080eb785a15db88756)) * empty commit to trigger release-please ([fcef0d3](https://www.github.com/googleapis/java-firestore/commit/fcef0d302cd0a9339d82db73152289d6f9f67ff2)) * make BulkWriterOptions public ([#502](https://www.github.com/googleapis/java-firestore/issues/502)) ([6ea05be](https://www.github.com/googleapis/java-firestore/commit/6ea05beb3f27337bef910ca64f0e3f32de6b7e98)) * retry Query streams ([#426](https://www.github.com/googleapis/java-firestore/issues/426)) ([3513cd3](https://www.github.com/googleapis/java-firestore/commit/3513cd39ff43d26c8432c05ce20693350539ae8f)) * retry transactions that fail with expired transaction IDs ([#447](https://www.github.com/googleapis/java-firestore/issues/447)) ([5905438](https://www.github.com/googleapis/java-firestore/commit/5905438af6501353e978210808834a26947aae95)) * verify partition count before invoking GetPartition RPC ([#418](https://www.github.com/googleapis/java-firestore/issues/418)) ([2054ae9](https://www.github.com/googleapis/java-firestore/commit/2054ae971083277e1cf81c2b57500c40a6faa0ef)) ### Documentation * **sample:** normalize firestore sample's region tags ([#453](https://www.github.com/googleapis/java-firestore/issues/453)) ([b529245](https://www.github.com/googleapis/java-firestore/commit/b529245c75f770e1b47ca5d9561bab55a7610677)) ### Dependencies * remove explicit version for jackson ([#479](https://www.github.com/googleapis/java-firestore/issues/479)) ([e2aecfe](https://www.github.com/googleapis/java-firestore/commit/e2aecfec51465b8fb3413337a76f9a3de57b8500)) * update dependency com.google.cloud:google-cloud-conformance-tests to v0.0.12 ([#367](https://www.github.com/googleapis/java-firestore/issues/367)) ([2bdd846](https://www.github.com/googleapis/java-firestore/commit/2bdd84693bbd968cafabd0e7ee56d1a9a7dc31ca)) * update dependency com.google.cloud:google-cloud-conformance-tests to v0.0.13 ([#411](https://www.github.com/googleapis/java-firestore/issues/411)) ([e6157b5](https://www.github.com/googleapis/java-firestore/commit/e6157b5cb532e0184125355b12115058e72afa67)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.0 ([#383](https://www.github.com/googleapis/java-firestore/issues/383)) ([cb39ee8](https://www.github.com/googleapis/java-firestore/commit/cb39ee820c2f67e22da623f5a6eaa7ee6bf351e2)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.2 ([#403](https://www.github.com/googleapis/java-firestore/issues/403)) ([991dd81](https://www.github.com/googleapis/java-firestore/commit/991dd810360e654fca0b53e0611da0cd77febc7c)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.12.1 ([#425](https://www.github.com/googleapis/java-firestore/issues/425)) ([b897ffa](https://www.github.com/googleapis/java-firestore/commit/b897ffa90427a8f597c02c24f80d1d162be48b23)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.13.0 ([#430](https://www.github.com/googleapis/java-firestore/issues/430)) ([0f8f218](https://www.github.com/googleapis/java-firestore/commit/0f8f218678c3ddebb73748c382cab8e38c2f140d)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.14.1 ([#446](https://www.github.com/googleapis/java-firestore/issues/446)) ([e241f8e](https://www.github.com/googleapis/java-firestore/commit/e241f8ebbfdf202f00424177c69962311b37fc88)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.15.0 ([#460](https://www.github.com/googleapis/java-firestore/issues/460)) ([b82fc35](https://www.github.com/googleapis/java-firestore/commit/b82fc3561d1a397438829ab69df24141481369a2)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.0 ([#481](https://www.github.com/googleapis/java-firestore/issues/481)) ([ae98824](https://www.github.com/googleapis/java-firestore/commit/ae988245e6d6391c85414e9b6f7ae1b8148c3a6d)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.1 ([4ace93c](https://www.github.com/googleapis/java-firestore/commit/4ace93c7be580a8f7870e71cad2dc19bb5fdef29)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.17.0 ([#487](https://www.github.com/googleapis/java-firestore/issues/487)) ([e11e472](https://www.github.com/googleapis/java-firestore/commit/e11e4723bc75727086bee0436492f458def29ff5)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.18.0 ([#495](https://www.github.com/googleapis/java-firestore/issues/495)) ([f78720a](https://www.github.com/googleapis/java-firestore/commit/f78720a155f1294321f05266b9a546bbf2cb9a04)) * update jackson dependencies to v2.11.3 ([#396](https://www.github.com/googleapis/java-firestore/issues/396)) ([2e176e2](https://www.github.com/googleapis/java-firestore/commit/2e176e2f864262f31e6f93705fa7e794023b9649)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
PR to release bundles. Will merge when we decide to release.